Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 停止INTERNET EXPLORER打印白色和灰色文本_Css_Internet Explorer_Printing_Background Image - Fatal编程技术网

Css 停止INTERNET EXPLORER打印白色和灰色文本

Css 停止INTERNET EXPLORER打印白色和灰色文本,css,internet-explorer,printing,background-image,Css,Internet Explorer,Printing,Background Image,打印时,internet explorer 11将文本颜色从白色更改为灰色 <style> .s1{ FONT-SIZE: 97.8px; FONT-FAMILY: Arial-BoldMT_o; FONT-WEIGHT: bold; color: rgb(255,255,255); } </style> <div id='t1' class='s1'>Print these letters white - not gr

打印时,internet explorer 11将文本颜色从白色更改为灰色

<style>
.s1{
    FONT-SIZE: 97.8px;
    FONT-FAMILY: Arial-BoldMT_o;
    FONT-WEIGHT: bold;
    color: rgb(255,255,255);
    }
</style>
<div id='t1' class='s1'>Print these letters white - not grey!</div>

.s1{
字体大小:97.8px;
字体系列:Arial-BoldMT_o;
字体大小:粗体;
颜色:rgb(255255);
}
把这些字母打印成白色,而不是灰色!
试试这个: 改变

.s1  { your css here } => #t1 { your css here } 
可能会有帮助

或者更改您的html代码

id='t1' class='s1'
to=>仅适用于:

class='s1'
关于“CSS特异性”的所有内容
这是一个众所周知的问题。我还用谷歌Chrome测试了这个问题,它还以灰色打印文本

原因是浏览器认为在白纸上打印白色文本没有意义,因为用户看不见。浏览器无法猜测您打印白色文本的目的。这就是浏览器以灰色打印的原因

我建议您尝试参考以下步骤

  • 转到文件菜单

  • 单击页面设置选项

  • 选中名为“打印背景色和图像”的选项

  • 单击确定
  • 现在,如果您打印页面,您将注意到文本以白色打印。您需要设置页面的背景色才能看到效果