[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;
}

猜你喜欢

转载自www.cnblogs.com/Answer1215/p/10067965.html