好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

HTML基础(四)设置超链接的样式示例

***设置超链接的样式示例

a:link 超链接被点前状态

a:visited 超链接点击后状态

a:hover 悬停在超链接时

a:active 点击超链接时

在定义这些状态时,有一个顺序 l v h a

代码区:

  1     DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://HdhCmsTestw3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"  > 
  2     html   xmlns  ="http://HdhCmsTestw3.org/1999/xhtml"  > 
  3     head  > 
  4     meta   http-equiv  ="Content-Type"   content  ="text/html; charset=utf-8"   /> 
  5     title  > 无标题文档   title  > 
  6     style   type  ="text/css"  > 
  7   a:link
   8   { 
  9       color  :  #000  ; 
 10       text-decoration  :  none  ;  } 
 11   a:visited
  12   { 
 13       color  :  #000  ; 
 14       text-decoration  :  none  ;  } 
 15   a:hover
  16   { 
 17       color  :  #F00  ; 
 18       text-decoration  :  underline  ;  } 
 19   a:active
  20   { 
 21       color  :  #F90  ; 
 22       text-decoration  :  underline  ;  } 
 23     style  > 
 24     link   href  ="Untitled-1.css"   rel  ="stylesheet"   type  ="text/css"   /> 
 25     head  > 
 26  
 27     body  > 
 28     a   href  ="http://HdhCmsTestbaidu测试数据/"  > 百度一下   a  > 
 29     body  > 
 30     html  >  

查看更多关于HTML基础(四)设置超链接的样式示例的详细内容...

  阅读:40次