How to get a background image to print using css?

后端 未结 10 709
再見小時候
再見小時候 2020-11-27 18:21

I am using the ASP Net Sprites package to create CSS Sprites on my website.

It is working, but the images it generates do not appear when printed.

The code g

10条回答
  •  生来不讨喜
    2020-11-27 18:57

    For Chrome and Safari you can add the following in your CSS:

    @media print
    {
        * {-webkit-print-color-adjust:exact;}
    }
    

    For other web browsers unfortunately it's up to the user to manually select the option to print background images (e.g. for users with IE 9, 10 and 11 they have to click on the cog icon -> Print -> Page Setup, and activate the option)

提交回复
热议问题