Chrome: Print preview differs from simulate CSS media print

北慕城南 提交于 2020-01-20 05:09:26

问题


I am having an issue when I print my page in Chrome 26 where tables appear with grey background colour.

When I view the page in chrome with simulated CSS media print it looks fine

When printing in Safari everything works fine. Anyone knows how to fix this issue?


回答1:


Here is the solution: Add this to your print css

* {transition: none !important}

See: http://wisercoder.com/print-preview-significantly-different-inspector-chrome/




回答2:


You can try -webkit-print-color-adjust:exact;, which overrides the setting where Chrome removes background colors. This could fix your problem.



来源:https://stackoverflow.com/questions/16529683/chrome-print-preview-differs-from-simulate-css-media-print

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!