HTML / CSS - 打印,背景颜色和图像的样式不会在IE和Firefox中显示? [英] HTML/CSS - Styling for print, background color and image would not show in IE and Firefox?

查看:929
本文介绍了HTML / CSS - 打印,背景颜色和图像的样式不会在IE和Firefox中显示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在打印时显示背景颜色和图像,我知道这是浏览器属性,但我想从CSS完成它,例如我使用webkit -webkit-print-color-

how can i show the background color and image while printing, i knew it this is the browser properties but i want to complete it from CSS such as i use for webkit -webkit-print-color-adjust: exact; so how can i achieve it.

推荐答案

不,这是不可能的,请参阅: -webkit-print-color-adjust

No, it is not possible, see: -webkit-print-color-adjust

-webkit-print-color-adjust 属性是非标准的CSS扩展可以用于在基于WebKit引擎的浏览器中强制打印背景颜色和图像。

The -webkit-print-color-adjust property is a non-standard CSS extension that can be used to force printing of background colors and images in browsers based on the WebKit engine.

对于Firefox或IE没有这样的解决方案。

There is no such solution for Firefox or IE.

唯一的解决方法是在打印对话框中手动取消选中复选框打印背景颜色

The only solution there is to uncheck the checkbox "Print background colors" in the print dialog manually.

这篇关于HTML / CSS - 打印,背景颜色和图像的样式不会在IE和Firefox中显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆