灰色字体彩色打印 [英] Grey Font Color Printing

查看:130
本文介绍了灰色字体彩色打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有任何方法可以确保我的灰色字体颜色不会变黑吗?

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

Firefox和Chrome似乎执行此操作以防止黑色背景上的白色文本从变成白色在白色。我没有背景颜色(白色除外),所以这种浏览器级别的转换没有用,它只是帮助防止灰色颜色没有理由。

Firefox and Chrome seem to do this in order to prevent white text on black background from turning into white on white. I do not have a background color (except white), so this browser-level conversion is not useful, it only helps in preventing grey colors for no reason.

一种方法来关闭这个?或者,我应该坚持使用透明度,浏览器检测和着色我的灰度等技术...

Is there a way to turn this off? Or should I just stick with techniques like opacity, browser detection, and coloring my grays...

推荐答案

解决方案:

  @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;
        }
      }
   }

这篇关于灰色字体彩色打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆