Home  >  Article  >  Web Front-end  >  ## How to Print Background Images with CSS Sprites?

## How to Print Background Images with CSS Sprites?

Mary-Kate Olsen
Mary-Kate OlsenOriginal
2024-10-25 02:33:29246browse

## How to Print Background Images with CSS Sprites?

Printing Background Images in CSS

When utilizing CSS sprites for website imagery, it may be encountered that images do not print when the page is printed. To enable printing of the background image, consider the following solutions:

  • For Chrome and Safari:

Add the following CSS rule to your print stylesheet:

<code class="css">@media print {
  * { -webkit-print-color-adjust: exact; }
}</code>
  • For Other Browsers:

Unfortunately, other web browsers (e.g., IE 9, 10, and 11) require manual user intervention. Users need to:

  1. Click the print settings icon (usually a gear or wrench).
  2. Select "Print."
  3. In the "Page Setup" dialog box, enable the option to print "Background Graphics."

The above is the detailed content of ## How to Print Background Images with CSS Sprites?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn