Pseudo-class selector

 1 <!DOCTYPE html>
 2 <html>
 3     <head>
 4         <meta charset="UTF-8">
 5         <title>伪类选择器</title>
 6         <style type="text/css">
 7             *{
 8                 font-size: 30px;
 9             }
10             #a{
11                 text-decoration: none; 
12                  
13              } 
14              
15              /* unvisited link */ 
16              a:link { 
17                  color : red ; 
18              } 
19              
20              /* visited link */ 
21              a:visited { 
22                  color : green ; 
23              } 
24              / * mousemouse */ 
25              a:hover { 
26                  color : blue ; 
27              } 
28             /*鼠标选定*/
29             a:active{
30                 color: yellow;
31             }
32              
33             
34         </style>
35     </head>
36     <body>
37         <a id="a" href="https://www.baidu.com">百度</a>
38         <a href="https://www.jd.com">京东</a>
39         <a href="https://www.taobao.com">淘宝</a>
40     </body>
41 </html>

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324975664&siteId=291194637