I styled an element with a narrow width and high height.
However, creating a vertical line from <hr> does not seem semantic, so you can use <span> or some other element.
body { background: #f4f4f4; } hr.fancy-line { border: 0; height: 180px; width: 5px; margin: 0 auto; background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 75%); }
<hr class="fancy-line"></hr>
The way you implement strings depends on the context in which you use them. For example, if the lines will separate the elements on the page, you can create them as pseudo-elements, for example, below:
ul { list-style: none; margin: 0; padding: 0; } ul li { position: relative; display: inline-block; width: 180px; height: 180px; background-color: #CCC; } ul li:not(:last-child) { margin: 0 1em 0 0; } ul li:not(:last-child):after { content: ""; position: absolute; left: 100%; margin-left: .5em; height: 100%; width: 4px; background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 75%); }
<ul> <li></li> <li></li> <li></li> </ul>
source share