admin管理员组文章数量:1395185
I need to hide header and footer section in printing page . I have used below css code to hide the header and footer .
@page {
size: auto;
margin: 0;
}
Its only working in chrome & Firefox. But not working in safari. How can I fix this ? Please help me to find solution.
I need to hide header and footer section in printing page . I have used below css code to hide the header and footer .
@page {
size: auto;
margin: 0;
}
Its only working in chrome & Firefox. But not working in safari. How can I fix this ? Please help me to find solution.
Share Improve this question asked May 17, 2017 at 5:10 user7726968user7726968 611 gold badge1 silver badge7 bronze badges 01 Answer
Reset to default 3According to caniuse., @page
is not supported by Safari. Actually, size
property is not supported well in IE/Edge and Firefox, so it is better not to use it.
To hide header and footer in print page. Maybe you can use media query:
@media print {
header,footer {
display: none;
}
}
本文标签:
版权声明:本文标题:javascript - How to hide header & footer in printing page (window.print()) function in safari browser? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744605304a2615317.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论