Bug修复window.print()

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/weixin_41355260/article/details/84773879

1、table没固定宽度,导致打印过程出现换行

2、body被样式污染,设置了height:100%;(不知道谁在哪儿设的,反正不是我,直接在要打印的页面给了body{height:auto})

调试方法:

1.Ctrl+A看有没有空格溢出

2.给所有元素加了border (推荐1,总之看是否有空白溢出)

参考:https://bbs.csdn.net/topics/205666#new_post

猜你喜欢

转载自blog.csdn.net/weixin_41355260/article/details/84773879