覆盖`背景:透明!重要`在Twitter Bootstrap CSS [英] Override `background: transparent !important` in Twitter Bootstrap CSS

查看:222
本文介绍了覆盖`背景:透明!重要`在Twitter Bootstrap CSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个应用程序绘制 div 的背景颜色作为其图形。

这些div在屏幕上看起来很好,但 div 在打印到PDF时消失。



将问题追踪到Twitter Bootstrap CSS。当Bootstrap CSS不存在时,divs打印很好。但是不要打印的时候。请参阅此JSFiddle:



http://jsfiddle.net/VYg9s/



我认为问题是这个部分的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 divs with background color as its graphics.
These divs appear fine on screen but the divs 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:

http://jsfiddle.net/VYg9s/

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屋!

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