Home >Web Front-end >HTML Tutorial >Four states of html links_html/css_WEB-ITnose

Four states of html links_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:46:151151browse

Link. At this point, the link is there waiting for the user to click.
Visited. The user has clicked this link before.
Hover. The mouse pointer is hovering over the link.
Active. The link is being clicked (the mouse is pressed on the element and has not been released)

The following are the 4 pseudo-class selectors corresponding to these states (using the a selector and some example declarations):

a:link {color:black;}a:visited {color:gray;}a:hover {text-decoration:none;}a:active {color:red;}

Note: Since the specificity of these 4 pseudo-classes (specificity will be discussed later in this chapter) is the same, if you use them not in the order listed here, the browser may not display the expected results. . To make it easier to remember, I suggest you think of it this way: "LoVe? HA!" The capital letter is the first letter of each pseudo-class.







Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn