Αποτελέσματα Αναζήτησης
You can use the border property to style a hr element: Example. /* Red border */ hr.new1 { border-top: 1px solid red; } /* Dashed red border */ hr.new2 { border-top: 1px dashed red; } /* Dotted red border */ hr.new3 { border-top: 1px dotted red; } /* Thick red border */ hr.new4 { border: 1px solid red; } /* Large rounded green border */ hr.new5 {
The <hr> tag defines a thematic break in an HTML page (e.g. a shift of topic). The <hr> element is most often displayed as a horizontal rule that is used to separate content (or define a change) in an HTML page.
CSS. body { background-color: #f0f0f0; width: 700px; float: center; } hr.style1 { border-top: 1px solid #8c8b8b; } hr.style2 { border-top: 3px double #8c8b8b; } hr.style3 { border-top: 1px dashed #8c8b8b; } hr.style4 { border-top: 1px dotted #8c8b8b; } hr.style5 { background-color: #fff; border-top: 2px dashed #8c8b8b; } hr.style6 ...
16 Σεπ 2024 · Instead of a solid line, you can make the <hr> look dotted or dashed by applying a border style. CSS Example: hr {border: none; border-top: 2px dashed #ccc; /* Dashed or dotted line */...
Here is a sample code of what your CSS should look like to get the blue horizontal line. hr { border: 0; width: 100%; color: #123455; background-color: #123455; height: 5px; } Or you could just add the style to your HTML page directly when you insert a horizontal line, like this: <hr style="background:#123455" /> Hope this helps.
18 Simple Styles for horizontal rules (<hr> CSS design). Compatible browsers: Chrome (partially), Edge (partially), Firefox, Opera (partially), Safari (partially) Dependencies: -
1 Μαΐ 2021 · CSS styling. 3.1 Resetting the default style. Browsers render <hr> as a horizontal rule by default. W3Schools (2021a) offers the CSS code that most browsers use as their default style: hr { display: block; margin-top: 0.5em; margin-bottom: 0.5em; margin-left: auto; margin-right: auto; border-style: inset; border-width: 1px; }