您的位置:首页 > Web前端 > CSS

巧妙利用CSS自定义网页下划线样式

2012-02-17 09:53 323 查看
巧妙利用CSS自定义网页下划线样式

实现方法很简单,在源代码的<head>和<head>之间加上如下的CSS语法控制:

   <style type="text/css">

   <!--

   a:link { text-decoration: none;color: blue}

   a:active { text-decoration:blink}

   a:hover { text-decoration:underline;color: red}

   a:visited { text-decoration: none;color: green}

   -->

   </style>

  其中:

  a:link 指正常的未被访问过的链接;

  a:active 指正在点的链接;

  a:hover 指鼠标在链接上;

  a:visited 指已经访问过的链接;

  text-decoration是文字修饰效果的意思;

  none参数表示超链接文字不显示下划线;

  underline参数表示超链接的文字有下划线

/article/4193222.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: