Print css backgrounds in safari/chrome?

2019-04-21 08:58发布

I need to print some pages with CSS backgrounds but they don't appear in Safari or Chrome, in FF there's an option in Page Setup but I haven't been able to find it in these two browsers. Do they not support it?

Thanks all in advance.

4条回答
相关推荐>>
2楼-- · 2019-04-21 09:13

I had this issue again, it was the Twitter Bootstrap CSS causing the issue. When I stopped using Bootstrap, the issue was resolved without any need for the special CSS property (-webkit-print-color-adjust:exact;).

查看更多
趁早两清
3楼-- · 2019-04-21 09:24

With the newest Chrome, that is an option.

enter image description here

You can also just take a screen shot and print the bitmap image in an image editor or paste the screen shot in Word to print.

Chrome Version 69.0.3497.100 (Official Build) (64-bit)

查看更多
看我几分像从前
4楼-- · 2019-04-21 09:32

In chrome (newer versions 17+ I think), this is controlled by a CSS property on the items which developers can add:

-webkit-print-color-adjust:exact;

From the user's point of view, there doesn't seem to be an option for this.

查看更多
forever°为你锁心
5楼-- · 2019-04-21 09:34

Printing background images is a browser-dependent feature. FF and IE have it but you cannot force it otherwise via sourcecode.

查看更多
登录 后发表回答