在 Chrome 中打印背景颜色 [英] Print Background colours in Chrome
问题描述
我正在尝试用 chrome 打印 PHP 生成的文档,在浏览器上看起来不错 链接到我想打印的页面 但是我的打印机不会打印任何彩色背景,有人可以提供任何建议吗?我可以用 CSS 做到这一点吗?
I am trying to print a PHP generated document in chrome, on the browser it looks fine Link to the page I want to print But my printer will not print any coloured backgrounds, can anyone offer any suggestions please? Can I do this with CSS?
推荐答案
您在浏览器中调整,是否打印背景颜色和图像.查看您的浏览器打印选项.
You adjust in the browser, whether the background colors and images are printed. See your browsers printing options.
Google Chrome 从 26 版开始提供此功能(2013 年 3 月).
Google Chrome offers this feature starting from version 26 (march 2013).
此外,从版本 17 开始,Chrome 允许使用 -webkit-print 以编程方式更改背景打印行为-color-adjust:exact;
在元素 CSS 中打印背景.
Also starting from version 17, Chrome allows changing the background print behavior programmatically by using -webkit-print-color-adjust:exact;
in the element CSS to print the background.
这篇关于在 Chrome 中打印背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!