1. 程式人生 > >[CSS3] Identify Interactive HTML Elements with CSS Link Pseudo Classes

[CSS3] Identify Interactive HTML Elements with CSS Link Pseudo Classes

The interactive pseudo-classes for links (and buttons) allow us to make sure the user knows what elements on the page are interactive and that they can use them to navigate the website.

 

Targeting the a tag with href attr:

a[href]:hover {
  text-decoration: underline;
}

 

or 

a:link:hover {
  border: 2px solid green;
}