Chrome: Print preview differs from simulate CSS me

2019-02-13 15:38发布

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

in browser

when printing

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

2条回答
Summer. ? 凉城
2楼-- · 2019-02-13 15:59

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

查看更多
做个烂人
3楼-- · 2019-02-13 16:14

Here is the solution: Add this to your print css

* {transition: none !important}

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

查看更多
登录 后发表回答