CSS伪类

<!DOCTYPE html>

<html>

 <head>

  <meta charset="utf-8">

  <title></title>

  <style>

   a{

    color:black;

   }

   a:visited{

    color:purple;

   }

   a:hover{

    color:red

   }

   a:active{

    color:blue;

   }

  </style>

 </head>

 <body>

  <div>

   <!-- CSS充许咱们针对a标签的4种状态设置各自的CSS特性,叫作CSS伪类<br />

   注意事项:1:active通常没必要写;2:设置状态时必定注意顺序是LVHA;3:a:link{...}能够简写为a{} -->

  </div>

  <div>

   <a>空连接1</a>

   <a>空连接2</a>

   <a>空连接3</a>

   <a>空连接4</a>

  </div>

 </body>

</html>
相关文章
相关标签/搜索