Hacker News new | ask | show | jobs
by diminish 4675 days ago
Did anyone understand how to implement them? are they JS or CSS or both based?
1 comments

All CSS. Most of them use the :before and :after content trick to insert extra text on the page. Some of the more unique ones use a data-hover attribute with a copy of the link text so that they can show two copies of the same text at the same time and style them differently. (It isn't really cheating, but it's not something you'd want to do for every link on your website.)

BTW, you can right-click a link and inspect with firebug or chrome dev tools to see what css styles are applied to it and how they change when you hover over the link.