Home >Web Front-end >CSS Tutorial >How to Print Background Images Generated by ASP.NET Sprites in Different Browsers?
Printing Background Images with CSS
Problem:
ASP Net Sprites generated CSS Sprites are not printing. The generated HTML code includes tags with base64 encoded data, rendering the images invisible at print.
Solution:
For Chrome and Safari:
<code class="css">@media print { * {-webkit-print-color-adjust:exact;} }</code>
This CSS rule forces Chrome and Safari to print background images as intended, regardless of their source.
For Other Web Browsers:
Unfortunately, for other web browsers, users must manually enable background image printing. For example, in IE 9, 10, and 11, users must:
The above is the detailed content of How to Print Background Images Generated by ASP.NET Sprites in Different Browsers?. For more information, please follow other related articles on the PHP Chinese website!