我想以A4尺寸打印网页。目前我用过@page{size:auto},@media print{}。我需要每个页面都有边框,并且应该使用分页符来完成。在某些浏览器中,打印预览功能已被打破。请帮我。
我的代码:
@media print{
@page{size: auto;
margin:0px 0px 20px 0px;}
.pagebreak {
page-break-before: always;
}
body, h1, h2, h3, ol, ul, div { width: auto; border: 0; margin: 0; padding: 0; float: none; position: static; overflow: visible; }
.header, .event_sidebar, .detail_header, .detail_img, .action_button, #ev_map, .related_eve, .footer{display: none;}
.event_container{
max-width:730px;
width:100%;
height:auto;
margin:0px auto;
outline: none;
border:double;
position:relative;
}
.event_print_header {
height: auto;
max-width:730px;
width: 98%;
margin:0px auto;
position:relative;
}
.event_print_header img{width:99.99%;}
.event_contentarea{
width: 100%;
margin: 0px;
padding:0px; …Run Code Online (Sandbox Code Playgroud)