Thuộc tính mồ côi CSS
Ví dụ
Khi in hiển thị ít nhất 4 dòng ở cuối và 2 dòng ở đầu mỗi trang:
@media print {
orphans: 4;
widows: 2;
}
Định nghĩa và cách sử dụng
Thuộc tính orphans
chỉ định số dòng tối thiểu phải để lại ở cuối trang hoặc cột.
Mẹo: Cũng hãy xem tài sản widows
.
Giá trị mặc định: | 2 |
---|---|
Thừa hưởng: | Đúng |
Hoạt hình: | KHÔNG. Đọc về hoạt hình |
Phiên bản: | CSS3 |
Cú pháp JavaScript: | đối tượng .style.orphans = "3" |
Hỗ trợ trình duyệt
Các số trong bảng chỉ định phiên bản trình duyệt đầu tiên hỗ trợ đầy đủ thuộc tính.
Property | |||||
---|---|---|---|---|---|
orphans | 25.0 | 8.0 | Not supported | 3.1 | 10.0 |
Cú pháp CSS
orphans: integer |initial|inherit;
Giá trị tài sản
Value | Description |
---|---|
integer | Specifies the minimum number of lines that must be left at the bottom of a page or column. Negative values are not allowed |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |