Can the styling of the :after
pseudo-element be applied to every line of multi-line text?
Here is the code I am currently using:
.container {
width: 50px;
}
.text {
position: relative;
}
.text:after {
content: '';
position: absolute;
bottom: 4px;
left: 0;
width: 100%;
height: 6px;
background: linear-gradient(red, yellow);
z-index: -1;
}
<div class="container">
<p class="text">This is some multi-line text...</p>
</div>
Although the example demonstrates that the after element is correctly applied, it is only visible on the last line of the text. Is there a way to extend this styling to all lines?
Thank you!