How to set the color of & lt;hr> by css
This article mainly introduces "how to set the color of css". In the daily operation, I believe many people have doubts about how to set the color of css. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "how to set the color of css"! Next, please follow the editor to study!
Method: 1, use "background-color" attribute setting, syntax is "hr {background-color: color value;}"; 2, use "border-color" attribute setting, syntax is "hr {border-color: color value;}".
The operating environment of this tutorial: windows7 system, CSS3&&HTML5 version, Dell G3 computer.
How did css set the color?
In css, you can use the background-color attribute to set the color of the tag. Let's take a look at it through an example, which is as follows:
Hr {border: none; height: 1px; background-color:red;} 123132132
Output result:
2. Use the border attribute to set the label color. An example is as follows:
Hr {border: 1px solid; border-color:red;} 123132132
Output result:
At this point, the study of "how to set the color of css" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!