リンクのcss制御|css継承

1653 ワード

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
  <TITLE> New Document </TITLE>
  <META NAME="Generator" CONTENT="EditPlus">
  <META NAME="Author" CONTENT="">
  <META NAME="Keywords" CONTENT="">
  <META NAME="Description" CONTENT="">
  <style>
  /**
  1.   A  , class yangshi   
      font-size    ,     1.     。
  */
  a.yangshi:link{color:red;text-decoration:none}
  a.yangshi:hover{color:green;text-decoration:underline}
  a.yangshi:active{color:red;text-decoration:none}
  /**
  2.   A     
  */
  a:link{color:red;text-decoration:none;font-size:20px}
  a:hover{color:blue;text-decoration:underline;font-size:20px}
  a:active{color:red;text-decoration:none;font-size:20px}
 /**
  3.    yangshi1 ,    A      
  */
 .yangshi1 a:link{color:red;text-decoration:none;font-size:14px}
 .yangshi1 a:hover{color:yellow;text-decoration:underline;font-size:14px}
 .yangshi1 a:active{color:red;text-decoration:none;font-size:14px}

  </style>
 </HEAD>

 <BODY>
 
   <div><a href="#" class="yangshi">   </a></div>
   <div><a href="#" >   2</a></div>
   <div class="yangshi1"><a href="#" >   3</a></div>
 </BODY>
</HTML>