Is it possible to highlight only the line that the mouse pointer is hovering on? Let's say I have this paragraph:
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Nam in nisi eleifend, efficitur ligula vel, scelerisque risus.
Interdum et malesuada fames ac ante ipsum primis in faucibus.
Nam semper diam sodales eros dictum euismod. Duis ut hendrerit leo. Sed iaculis sem ac est porttitor facilisis.
In convallis facilisis libero ut interdum. Phasellus scelerisque ex in lacus tempus mollis. Integer scelerisque viverra elit id fringilla. Proin nibh arcu, imperdiet a lacus ac, feugiat interdum sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Suspendisse ultrices vestibulum orci, a varius quam cursus ut. Nulla ut suscipit sapien. Morbi et urna elementum, pretium augue non, tristique nulla. Nulla massa tellus, facilisis at fringilla et, rutrum ac libero.
</p>
Would it be possible to highlight the first line if I hover over it, second line if I hover over it and so on and so forth?
Illustration:
Source: http://www.crossboweducation.us/
I'm looking for a solution that would apply for multi-line paragraphs. One where I don't have to add span in every word manually.
EDIT (21.06.2016): - (solution to highlight entire paragraph)
Rory McCrossan's solution works basically but when I tried to implement it in my wordpress blog there was a problem with the highlighting, at first it works well, i scroll down a bit and the highlight position is calculated wrong. So, there's a neat solution I just found while working on this website, you need to load hover.css and add the class hvr-fade
to each <p>
tag... this of course doesn't take care of the original question but it's another approach to solving a similar problem very easily with a great css hover effect collection. Hope this helps someone...