使用CSS去除 去掉超链接的下划线方法
2013-02-14 19:57
253 查看
下面我们做一个这样的链接:未被点击时超链接文字无下划线,显示为蓝色;当鼠标在链接上时有下划线,链接文字显示为红色;当点击链接后,链接无下划线,显示为绿色。
实现方法很简单,在源代码的<head>和<head>之间加上如下的CSS语法控制:
Javascript代码
<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参数表示超链接的文字有下划线
-------------------------------------------------------------------------
演示:让网页中的链接去掉下划线
Java代码
<style type="text/css">
<!--
A { text-decoration: none}
-->
</style>
将代码插入在<head></head>之间.<title>之前即可
实现方法很简单,在源代码的<head>和<head>之间加上如下的CSS语法控制:
Javascript代码
<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>
<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参数表示超链接的文字有下划线
-------------------------------------------------------------------------
演示:让网页中的链接去掉下划线
Java代码
<style type="text/css">
<!--
A { text-decoration: none}
-->
</style>
<style type="text/css"> <!-- A { text-decoration: none} --> </style>
将代码插入在<head></head>之间.<title>之前即可
相关文章推荐
- 使用CSS去除 去掉超链接的下划线方法
- 【css】 使用CSS去除 去掉超链接的下划线方法
- 使用CSS去除 去掉超链接的下划线方法
- 使用CSS表达式去除超链接的虚框的一些方法
- 用CSS设置超链接使用新窗口打开的方法
- 使用CSS设置滚动条样式以及如何去掉滚动条的方法
- CSS去掉链接下划线的方法
- CSS控制来实现去除超链接的下划线
- 使用CSS去掉网页中超链接的下划线示例
- css中如何去除超链接的下划线
- ps如何去掉图片水印 PS使用仿制图章工具去除水印方法图解
- 用CSS改变超链接颜色去掉下划线
- Android使用TextView实现无下划线超链接的方法
- QLabel实现超链接,设置超链接颜色,去掉超链接下划线方法
- TextView使用超链接去掉下划线
- 利用css去掉超链接下划线
- css去掉a超链接锚文本自带下划线
- css去掉使用bootstrap框架后打印网页时预览效果下的超链接
- CSS------Filter属性的使用方法
- Sublime2插件emmet(原名zencoding)使用方法,强大的html/css编辑功能