css - Mozilla Firefox 在打印时添加间隙

标签 css google-chrome firefox printing

我尝试使用 window.print() 进行打印,它在 Google Chrome 上运行良好。但是,我不知道为什么在 Mozilla Firefox 上它的左侧有一个缺口。

使用 Google Chrome 打印:

Chrome

使用 Mozilla Firefox 打印:

Firefox

我必须为 Mozilla 添加任何 CSS 吗?

最佳答案

Mozilla 默认将页面大小设置为 A2,从 link 可以明显看出这一点.所以你可以通过将页面大小设置为 A4 for mozilla 来解决这个问题。看起来 Mozilla 将 A2 视为默认大小。

关于css - Mozilla Firefox 在打印时添加间隙,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45364458/

相关文章:

html - 即使在 div 中,转换(缩小)的 iframe 仍然占用空间

html - HTML 电子邮件正文是否可以引用作为附件发送的文件(在同一封电子邮件中)?

html - 表格行有边框但中间有间距

node.js - Express 静态网络请求卡在 "pending"

firefox - Firefox WebExtension 的低级 API

javascript - 如何编写一个 web 应用程序,其中一个用户的更新立即对所有用户可见?

google-chrome - 为什么Chrome Local Storage明明有数据却没有显示记录?

javascript - Date#toLocaleDateString Chrome 与 Electron

google-chrome - 在 chrome 和 firefox 中启用 ActiveX 控件

ruby-on-rails - 在 AWS Cloud 9 : VFS Connection does not exist [Firefox only] 上预览 Rails 服务器