【问题标题】:why 100% height of a div in print / preview in chrome is not working?为什么 chrome 中打印/预览中 div 的 100% 高度不起作用?
【发布时间】:2011-07-08 02:50:54
【问题描述】:

示例如下:

http://jsbin.com/oxunu3/6

在 chrome 和 firefox 中进行打印预览。为什么 chrome 不喜欢 100% 的高度?有什么破解之类的吗?

【问题讨论】:

  • Chrome没有没有打印预览功能吗?
  • 在 chrome 中输入 about:flags 即可启用。 Google 是你的朋友,我的朋友。
  • 我也注意到了这一点,并且很想知道为什么它不起作用。

标签: css firefox google-chrome printing


【解决方案1】:

众所周知,Webkit 浏览器有自己的小怪癖,这些小怪癖偏离了所谓的做事方式。我将 min-height: 更改为 height: 使用 ::before { content: <img src="spacer.gif" width="1" height="100%" />"; } 并且它有效。

看起来 Google 或 Apple 正在努力为人们节省墨水。

【讨论】:

    猜你喜欢
    • 2023-03-10
    • 2013-05-16
    • 2019-03-08
    • 1970-01-01
    • 2014-07-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多