Method: 1. Use the "background-color" attribute setting, the syntax is "hr{background-color: color value;}"; 2. Use the "border-color" attribute setting, the syntax is "hr{ border-color:color value;}".
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
How to set the color of
in css
In css, you can use the background-color attribute to set the
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <style> hr{ border: none; height: 1px; background-color:red; } </style> </head> <body> <h1>123132132</h1> <hr> </body> </html>
Output result:
## (Learning video sharing:
css video tutorial)
The above is the detailed content of How to set the color of