How to dynamically highlight content using css/html?
Posted on 2013-11-19
If we have clicked on a footnote link in a Wikipedia article, we have probably noticed that two things happen:
(1) the link brings you to the footnote section at the bottom of the page; and
(2) the selected footnote is highlighted with a different color.
In a list of footnotes, this feature makes it easy for the reader to visually access the appropriate footnote.
This is a neat little technique that is accomplished easily using the CSS3 :target pseudo-class selector.
Unfortunately, this CSS3 feature that has no support in basic ePub reader like Adobe digital editions, and so has been largely overlooked up to this point.