国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

CSS link styles

CSS link style:

a :link (not visited)



#a:hover

a:visited (visited: actually reached that page)

a:active (between mouse click and release) (interval, has no effect on a objects without href attributes)

These elements have different order when defining CSS, which will directly lead to different link display effects.

Specificity is sorted from general to special: link--visited--hover--active

The desired effect can be achieved as follows:

a:link {color: blue}

a:visited{color: red}

##a:hover{color: yellow}

a:active{color: white}

If defined like this:


a:hover{color: yellow}

a:link{color: blue}

a:visited{color: red}

a:active{color: white}

You can’t see hover It works, because :link is the most general effect and its scope is greater than hover, so the previous sentence is covered.

Example:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<title>鏈接樣式</title>
<style>
a:link {background-color:#B2FF99;}    /* unvisited link */
a:visited {background-color:#FFFF85;} /* visited link */
a:hover {background-color:#FF704D;}   /* mouse over link */
a:active {background-color:#FF704D;}  /* selected link */
</style>
</head>
<body>
<p><b><a href="/css/" target="_blank">這是一個(gè) link</a></b></p>
<p><b>注意:</b> hover必須在:link和 a:visited之后定義才有效.</p>
<p><b>注意:</b> active必須在hover之后定義是有效的.</p>
</body>
</html>

Continuing Learning
||
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>鏈接樣式</title> <style> body {background-color:#eaeaea} a#textColorStyle:link {color:#FF0000;} /* 未被訪問的鏈接 */ a#textColorStyle:visited {color:#00FF00;} /* 已被訪問的鏈接 */ a#textColorStyle:hover {color:#FF00FF;} /* 鼠標(biāo)指針移動(dòng)到鏈接上 */ a#textColorStyle:active {color:#0000FF;} /* 正在被點(diǎn)擊的鏈接 */ a#underlineStyle:link {text-decoration:none;} a#underlineStyle:visited {text-decoration:none;} a#underlineStyle:hover {text-decoration:underline;} a#underlineStyle:active {text-decoration:underline;} a#bgStyle:link {background-color:#B2FF99;} a#bgStyle:visited {background-color:#FFFF85;} a#bgStyle:hover {background-color:#FF704D;} a#bgStyle:active {background-color:#FF704D;} </style> </head> <body> <!--能夠設(shè)置鏈接樣式的 CSS 屬性有很多種(例如 color, font-family, background 等等)。鏈接的特殊性在于能夠根據(jù)它們所處的狀態(tài)來設(shè)置它們的樣式。--> <h3>鏈接的狀態(tài)</h3> <ul> <li>a:link - 普通的、未被訪問的鏈接</li> <li>a:visited - 用戶已訪問的鏈接</li> <li>a:hover - 鼠標(biāo)指針位于鏈接的上方</li> <li>a:active - 鏈接被點(diǎn)擊的時(shí)刻</li> </ul> <p><a id="textColorStyle" href="http://www.baidu.com" target="_blank" title="訪問百度">這是一個(gè)鏈接</a></p> <p><b>注釋:</b> <ol> <li>a:hover 必須位于 a:link 和 a:visited 之后</li> <li>a:active 必須位于 a:hover 之后</li> </ol> <p><a id="underlineStyle" href="http://www.baidu.com" target="_blank">自定義鏈接的下劃線樣式</a></p> <p><a id="bgStyle" href="http://www.baidu.com" target="_blank">自定義鏈接的背景色樣式</a></p> <!--鏈接框--> </body> </html>
submitReset Code