Grey Font Color Printing

前端 未结 9 922
心在旅途
心在旅途 2020-12-14 00:21

Is there any way to ensure that my grey font colors do not turn black?

Firefox and Chrome seem to do this in order to prevent white text on black background from tur

相关标签:
9条回答
  • 2020-12-14 01:16

    I thought that is the only div on that page. Make the following change, it should work fine.

    <style>
    @media print {
    div.red {
          color: #cccccc !important;
      }
    </style>
    

    And change the html of the div tag like below

    0 讨论(0)
  • 2020-12-14 01:25

    I found had to :

    1. Add !important to the css rule... and...

    2. In the Firefox print dialog, tick the option for "Appearance: Print background colors"

    I couldn't get it to work in Chrome.

    0 讨论(0)
  • 2020-12-14 01:25

    I found that TEXT color is not inherited by "general purpose" stylesheet, but must be forced again in print css file.

    In other words, even if text color is set in the general css file (one with media='all' attribute), it is ignored when printed, at least in Firefox and Chrome.

    I found that writing again (redundant but..... necessary) text color in print css file (one with media='print' attribute), color now will be considered.

    0 讨论(0)
提交回复
热议问题