【发布时间】:2012-08-27 07:47:26
【问题描述】:
我有一个在打印时需要一些自定义格式的 drupal 页面,所以我把它全部放在一个单独的打印 css 中。除了我的文本颜色之外,大部分都可以正常工作。
我已经尝试了所有与文本相关的选择器,甚至是*-selector。但它们都没有改变颜色。
起作用的是在我的真实页面上更改 Firefox 编辑器中的颜色。
HTML的一部分,这种情况下最里面的元素需要改成黑色:
<div class="field-label">Productgroep: </div>
<div class="field-items">
<div class="field-item even">
<a href="/taxonomy/term/43" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Fruit</a>
</div>
</div>
</div>
我试过的 CSS:
art-post-inner art-article, /* one of the wrappers */
field-items, /* the outer div */
a, /* select all links, I have also tried all the different states of a link (hovered, visited, etc) */
* /* select all */
{
color: #000;
}
如果您需要更多信息,请尽管询问。
【问题讨论】:
-
已尝试添加 !important 类似颜色:#000 !important;
-
我从未听说过
!important关键字。但它有效!请添加它作为答案,所以我可以接受它:) -
祝你好运,我加了