本文介绍了灰色字体彩色印刷的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有什么办法可以确保我的灰色字体颜色不会变黑?
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;
}
}
}
这篇关于灰色字体彩色印刷的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!