JS前端打印去除底部url地址
JS调用window.print()方法,打印页面,页脚部分会有URL显示。
去掉有两种办法
一、浏览器级别
打印的时候,关闭页眉页脚。
二、代码级别
/*
页面添加css
*/
@page {
margin:0;
}
@page含义
打印页面标识符:页面标识符
设置页面容器的版式,方向,边空等。
打印伪类(:first、:left、:right)
本文作者:Fly
本文链接:https://www.xuehuafei.cn/archives/js-frontend-printing-removes-the-url-address-at-the-bottom.html
版权声明:白嫖注明出处
有用