覆盖`背景:透明!重要`在Twitter Bootstrap CSS [英] Override `background: transparent !important` in Twitter Bootstrap CSS
问题描述
有一个应用程序绘制 div
的背景颜色作为其图形。
这些div在屏幕上看起来很好,但 div
在打印到PDF时消失。
将问题追踪到Twitter Bootstrap CSS。当Bootstrap CSS不存在时,divs打印很好。但是不要打印的时候。请参阅此JSFiddle:
我认为问题是这个部分的Twitter CSS。我 我需要重写背景:transparent!important
但不能为我的生活找出如何。
这可能很简单。尝试 background:opaque!important
但是没有工作,我似乎找不到一个允许值的列表 background
属性。
@media print {
* {
color:#000!重要;
text-shadow:none!important;
background:transparent!important;
box-shadow:none!important;
}
的背面是什么:background:transparent!important; c> c> c>
是背景:颜色十六进制代码!important;
Have an application that draws div
s with background color as its graphics.
These divs appear fine on screen but the div
s disappear when printing to PDF.
Traced the problem to Twitter Bootstrap CSS. The divs print fine when Bootstrap CSS is not present. But don't print when it is. See this JSFiddle:
I think the problem is this section of Twitter CSS. I think I need to override the background: transparent !important
but can't for the life of me figure out how.
This is presumably simple. Tried background: opaque !important
but that didn't work, and I can't seem to find a list of allowable values for the background
property.
@media print {
* {
color: #000 !important;
text-shadow: none !important;
background: transparent !important;
box-shadow: none !important;
}
What's the opposite of background: transparent !important;
in CSS?
The opposite of background: transparent !important;
is background: color hex code !important;
这篇关于覆盖`背景:透明!重要`在Twitter Bootstrap CSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!