日期:2014-05-17 浏览次数:20878 次
<style type="text/css"> <!-- a { color: #339966; text-decoration: none} a:hover { color: #FF3300; text-decoration: underline} --> </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>
<style type="text/css"> <!-- a#example1a { text-decoration: none; background: url(images/diagonal.gif) repeat-x 100% 100%; white-space: nowrap; padding-bottom: 2px; } a#example1b { text-decoration: none; white-space: nowrap; padding-bottom: 2px; } a#example1b:hover { background: url(images/diagonal.gif) repeat-x 100% 100%; } a#example2a { text-decoration: none; background: url(images/flower.gif) repeat-x 100% 100%; white-space: nowrap; padding-bottom: 10px; } a#example2b { text-decoration: none; white-space: nowrap; padding-bottom: 10px; } a#example2b:hover { background: url(images/flower.gif) repeat-x 100% 100%; } --> </style>
<p>实例:</p> <p> <a href="#" id="example1a">波纹线静态下划线</a> <a href="#" id="example1b">鼠标停留时出现的波纹线</a>。</p> <p> <a href="#" id="example2a">花朵静态下划线</a> <a href="#" id="example2b">鼠标停留时出现的花朵下划线</a>。</p>
<style type="text/css"> <!-- /*全局*/ a{text-decoration:underline;} /*有下划线*/ a:hover{text-decoration:none;} /*鼠标滑过无划线*/ /*局部的*/ a.line_none{text-decoration:none;color:#cc000;} /*line_none样式名的超链接无下划线*/ a.line_none:hover{text-decoration:underline;} /*鼠标滑过出现下划线*/ --> </style>
<a href="#">我是全局的超链接,所以有下划线</a> </br></br> <a href="#" class="line_none">我是局部局的超链接,我没有下划线</a> </br></br></br></br> <div class="none">我不是超链接,没有下划线</div> <div class="line">我不是超链接,有下划线</div>