开发者

when to use !important property in css?

开发者 https://www.devze.com 2023-03-01 07:02 出处:网络
Merged with When to use the !important property in CSS [duplicate]. #div p { color: red !important; } ...
Merged with When to use the !important property in CSS [duplicate].

#div p {
    color: red !important;
}
...
#div p {
    color: blue;
}

I understand how !important works, in this case the div will render red because now it has priority (!important). But I can't still figure开发者_运维问答 out an appropriate situation to use it. Does anybody know any example where !important saves the day?

0

精彩评论

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