Home  >  Article  >  Web Front-end  >  How to set the color of


in css

How to set the color of
in css

WBOY
WBOYOriginal
2021-11-25 18:52:2212018browse

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;}".

How to set the color of <hr> in css

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


tag The color of ;hr> Tag color, the example is as follows:
<!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:

How to set the color of <hr> in css## (Learning video sharing:

css video tutorial

)

The above is the detailed content of How to set the color of


in css. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn