Add a highlight color to multiple lines of text by simply using CSS box-shadow property. You can add more space or remove space between your lines by playing around with line-height:16px
or a negative box shadow height box-shadow: 0.5em 0 0 white,-0.5em 0 0 white;
.
1 |
<div><span>Do you have an idea to add a background-color property on a multi-line text.</span></div> |
1 2 3 4 5 6 7 8 |
span { color: black; background-color: white; box-shadow: 10px 0 0 white, -10px 0 0 white; line-height: 16px; } div { width: 100px; } |