开发者

Is there anything more important than !important in css?

开发者 https://www.devze.com 2023-03-26 08:06 出处:网络
It seems like my wordpress theme is adding a font color by default with !important condition and it appears as inline style. It targets not exactly what I need, so is there anything I can do about it?

It seems like my wordpress theme is adding a font color by default with !important condition and it appears as inline style. It targets not exactly what I need, so is there anything I can do about it? I already tried !important !i开发者_StackOverflow中文版mportant :)


The only thing that could override an inline style with !important is a child element's style:

<div style='color: red ! important'>
     <span style='color: green'>This is green.</span>
</div>


you can override inline html style with:

div[style] { color: red !important; }
0

精彩评论

暂无评论...
验证码 换一张
取 消