CSS @media打印问题与背景颜色; [英] CSS @media print issues with background-color;

查看:798
本文介绍了CSS @media打印问题与背景颜色;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这家公司是新的,我们有一个使用英里css的产品。我试图为我们的应用程序打印样式表,但我有在@media打印的背景颜色的问题...

  @media print {
#header {display:none;}
#adwrapper {display:none;}
td {border-bottom:solid; border-right:solid; background-color:#c0c0c0;}}

一切正常,我可以修改边框,背景颜色不会通过打印。现在我明白,你可能无法回答我的问题,更多的细节,我只是好奇,如果任何人有这个问题,或类似的,以前。

解决方案

如果用户在打印设置中关闭了打印背景颜色和图片,则CSS不会覆盖总是说明这一点。 这是默认设置



一旦设置完毕,便会打印背景颜色和图片, p>

它存在于不同的地方。
在IE9beta它在纸张选项下的打印 - >页面选项

中找到

在FireFox它在页面设置 - > [格式&选项]选项卡。


I'm new here at this company and we have a product that uses miles of css. I'm attempting to make a printable stylesheet for our app but i'm having issues with background-color in @media print...

@media print {
#header{display:none;}
#adwrapper{display:none;}
td {border-bottom: solid; border-right: solid; background-color: #c0c0c0;}}

everything else works, i can modify the borders and such but background-color won't come through in the print. Now I understand that y'all might not be able to answer my question with out more details, I was just curious if anyone had this issue, or something similar, before.

解决方案

IF a user has "Print Background colours and images" turned off in their print settings, no CSS will override that, so always account for that. This is a default setting.

Once that is set so it will print background colours and images, what you have there will work.

It is found in different spots. In IE9beta it's found in Print->Page Options under Paper options

In FireFox it's in Page Setup -> [Format & Options] Tab under Options.

这篇关于CSS @media打印问题与背景颜色;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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