IOS 上的 Chrome 41 忽略了用于打印的 Css

标签 css

我想知道,为什么版本 41 上的 Chrome 会忽略这段代码:

@media print {
.main-header,
.main-footer {
    display: none;
}

这只影响 IOS 系统,在 WIndows 7 上这条规则有效,甚至在 windows 上的 Chrome 41 上也是如此。

最佳答案

需要添加 !important - 效果很好。

关于IOS 上的 Chrome 41 忽略了用于打印的 Css,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29428121/

相关文章:

Jquery .show() - 显示的 div 下面的 div 不会向下滑动

javascript - Pinterest 看板小部件 CSS 样式

javascript - 如果有办法做 background-size : cover and still be able to scroll around the image

javascript - D3.js 在 Mozilla Firefox 上无法正确呈现

javascript - 如何验证某些字段并在 ng-click AngularJS 上进行选择

css - 使用 CSS 为搜索结果格式化 div

css - 图标字体无法在 Windows Chrome 上呈现

css - 由于存在绝对定位,大多数元素周围是否还需要 div

html - 用新类覆盖 'btn-xs' 的 Bootstrap CSS

css - 什么时候以及为什么我们应该在 Angular 中使用 View Encapsulation