Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use the raise priority attribute in css! important

Shulou Source: shulou.com Published: 2022-06-03 08:28:42 11月13日 Update

This article explains "how to use css to raise priority attributes! Important "knowledge, in the actual case operation process, many people will encounter such difficulties, then let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!

The code is as follows:

Untitled document

#box div {

color:red;

}

.important_false {

color:blue;

}

.important_true {

color:blue ! important;

}

#box2 {

background-color: #cccccc ! important;

background-color: #000000;

}

#idColor {

color:gray;

}

Important is used at the end of this line. The priority of class is less than the priority of id. IE7 is red and Firefox is blue.

This line uses important

In different browsers, the color of this line of words should be different! IE7, Firefox is red. IE6 is blue.

"how to use css to raise priority attributes! The content of "important" is introduced here. Thank you for reading it. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!

Tags: Priority red attributes syntax different one line content more style browser knowledge blue application support browsing utility success learning next code Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Docker Shulou Technology macOS Huawei