how to make dotted hr in css code example

Example 1: how to style an hr tag

/* 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;
}

Example 2: how to make a dotted hr in css

/* hr {
  border:none;
  border-top:1px dotted #f00; 
  color:#fff;
  background-color:#fff;
  height:1px;
  width:50%;
} */

Tags:

Css Example