<html> <head> <style>a{TEXT-DECORATION:none}</style> </head><body>
1、仅仅在head与head中间加入<style>a{ TEXT-DECORATION:none }</style> css
这一句就去掉超连接下划线了,这是个最简单的例子,你试着这样作就会成功的。<a class=n href=http://www.webshu.com>网页树树</a> <a class=n href=http://www.cctv.com>中央电视台</a> <a class=n href=http://www.jbxue.com>脚本学堂</a>
3、如何让超连接去掉下划线,鼠标停留在上面时有下划线? html
能够在head与head之间加上这样一句:<style>a{ TEXT-DECORATION:none}a:hover{TEXT-DECORATION:underline }</style><style>a{ TEXT-DECORATION:none }a.xh{ TEXT-DECORATION:none } a:hover.xh{ TEXT-DECORATION:underline }</style>,它等价于<style> a,a.xh{ TEXT-DECORATION:none }a:hover.xh{ TEXT-DECORATION:underline }</style>
加入这句以后,网页内的超连接都没有下划线。 web
由上能够看出,咱们又用了一次CSS伪类,它的定义格式是:选择符.类选择符{ 属性;属性值 },例如前面提到的 a.xh{ TEXT-DECORATION:none }。