1

我需要覆盖以下内联样式:

<div class="header" style="background:url(http://domain.org/headers/header_image.jpg) top right repeat-y;">

我已经尝试在外部样式表中添加以下内容,但它不起作用。

.header[style] {background-image:none;!important}

请问有什么建议吗?

4

1 回答 1

7

你几乎得到它,只需进行以下更改,它应该可以工作

.header[style] {background-image:none !important;}

!important规则应仅在您的规则声明中!

参考..点击这里

于 2013-01-17T15:06:10.833 回答