<p>線の幅が「3px」、間隔が「5px」</p>
<div class="example"></div>
body {
  padding: 10px 5%;
}
.example {
  height: 1px;
  position: relative;
}
.example::before {
  content: "";
  background-image: linear-gradient(to right, #000, #000 3px, transparent 3px, transparent 8px);
  background-size: 8px 1px;
  background-repeat: repeat-x;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.