ฉันต้องการพิมพ์หน้า html ของฉัน ฉันมีมากกว่า 1 หน้า และฉันต้องการพิมพ์ส่วนท้ายที่ด้านล่างของหน้าสุดท้ายเท่านั้น ซีเอสของฉัน
@page {
size: 8.5in 11.0in;
margin-left: 0.7cm;
margin-top: 0.7cm;
margin-top: 0.7cm;
margin-bottom: 2.6cm;
margin-right: 0.5cm
}
#footer {
clear: both;
position: running(footer);
z-index: 10;
margin-top: -1em;
vertical-align: bottom;
height: 5%;
}
@page {
@bottom-center {
content: element(footer);
}
}
HTML:
<body><div id="content"></div>
<div id="footer"></div>
<body>
มันใช้งานได้ แต่เมื่อฉันมีตารางที่ใหญ่มากในตอนท้ายเนื้อหาของฉัน เช่น ตาราง 6 หน้า ส่วนท้ายของฉันก็จะแสดงสำหรับทุกหน้าที่มีตาราง