Grey Font Color Printing

前端 未结 9 943
心在旅途
心在旅途 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

    Solution:

      @media print {
          h1 {
            color: rgba(0, 0, 0, 0);
            text-shadow: 0 0 0 #ccc;
          }
    
          @media print and (-webkit-min-device-pixel-ratio:0) {
            h1 {
              color: #ccc;
              -webkit-print-color-adjust: exact;
            }
          }
       }
    

提交回复
热议问题