伪类选择器

 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             /*未访问的连接*/
16             a:link{
17                 color: red;
18             }
19             
20             /*以访问的连接*/
21             a:visited{
22                 color: green;
23             }
24             /*鼠标移动*/
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>

猜你喜欢

转载自www.cnblogs.com/yyb6/p/8960752.html