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

问题描述

有一个应用程序绘制 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-16 14:09