Learn how to style an hr element with CSS.
You can use the border
property to style a hr
element:
/* 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 {
border: 10px solid green;
border-radius: 5px;
}
Try it Yourself »
The HTML hr tag.
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!