![](/img/trans.png)
[英]How can i avoid breaking the border of pages while page-break in printing the html
[英]How can I give page border to html page while printing?
其實我在html頁面有邊框。 在打印時,內容分為兩頁,第一頁的下邊框和第二頁的上邊框不會出現。如何在打印時為每頁提供頁面邊框。我使用了@media print並編寫了css在里面。 是否還有其他解決方案,以便在打印頁面時,我應該在每個頁面的各個方面都使用?
我在這里制作了一個示例頁面,它將為每個頁面生成一個邊框。 在打印頁面時。 見DEMO 。
HTML代碼
<section id='page1'>
<div class='box'></div>
</section>
<section id='page2'>
<div class='box'></div>
</section>
<section id='page3'>
<div class='box'></div>
</section>
<section id='page4'>
<div class='box'></div>
</section>
CSS代碼
@media screen, print
{
.box{
border:1pt solid black;
border-radius:15px;
position:absolute;
top:0;
width:28.2cm;
height:19.3cm;
}
section{position:relative;}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.