สไตล์หน้าBreakBefore Property
ตัวอย่าง
ตั้งค่าตัวแบ่งหน้าก่อนแต่ละ <p> องค์ประกอบที่มี id="footer" เสมอ:
document.getElementById("footer").style.pageBreakBefore = "always";
ลองด้วยตัวคุณเอง »
ความหมายและการใช้งาน
คุณสมบัติ pageBreakBefore ตั้งค่าหรือส่งคืนลักษณะการแบ่งหน้าก่อนองค์ประกอบ (สำหรับการพิมพ์หรือการแสดงตัวอย่างก่อนพิมพ์)
หมายเหตุ:คุณสมบัติ pageBreakBefore ไม่มีผลกับองค์ประกอบในตำแหน่งที่แน่นอน ตัวแบ่งหน้าจะมองเห็นได้เฉพาะในตัวอย่างก่อนพิมพ์หรือเมื่อพิมพ์
รองรับเบราว์เซอร์
Property | |||||
---|---|---|---|---|---|
pageBreakBefore | Yes | Yes | Yes | Yes | Yes |
ไวยากรณ์
กลับคุณสมบัติ pageBreakBefore:
object.style.pageBreakBefore
ตั้งค่าคุณสมบัติ pageBreakBefore:
object.style.pageBreakBefore = "auto|always|avoid|emptystring|left|right|initial|inherit"
มูลค่าทรัพย์สิน
Value | Description |
---|---|
auto | Insert a page break before the element if necessary. This is default |
always | Always insert a page break before the element |
avoid | Avoid a page break before the element |
"" (empty string) | Page break is not inserted before the element |
left | Insert one or two page breaks before the element, so the next page is considered a left page |
right | Insert one or two page breaks before the element, so the next page is considered a right page |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
รายละเอียดทางเทคนิค
ค่าเริ่มต้น: | รถยนต์ |
---|---|
คืนมูลค่า: | สตริงที่แสดงถึงพฤติกรรมการแบ่งหน้าก่อนองค์ประกอบเมื่อพิมพ์ |
เวอร์ชัน CSS | CSS2 |
หน้าที่เกี่ยวข้อง
การอ้างอิง CSS: page-break-before property
❮ สไตล์วัตถุ