How to set the color of
in css

WBOY
Release: 2021-11-25 18:52:22
Original
12076 people have browsed it

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>
Copy after login

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!

Related labels:
css
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template