怎样用css去除超链接的下划线

2024-10-31 04:20:35
有5个网友回答
网友(1):

用一个时间的案例来说明吧

1    代码部分

     北京传智播客

    我要去除超链接下划线

2 以上代码在浏览器显示的效果  , 在浏览器段看到超链接是有下划线的,之后的操作咱们就是要去除下划线

3 去除下滑下 的代码  在a标签上 加上  style="text-decoration:none"

4  加上  style="text-decoration:none" 之后在页面上的显示效果 如下图

下划线就去掉了

网友(2):

1.下面做一个这样的链接:未被点击时超链接文字无下划线,显示为蓝色;当鼠标在链接上时有下划线,链接文字显示为红色;当点击链接后,链接无下划线,显示为绿色。 
实现方法很简单,在源代码的和之间加上如下的CSS语法控制: 

其中: 
  a:link 指正常的未被访问过的链接; 
  a:active 指正在点的链接; 
  a:hover 指鼠标在链接上; 
  a:visited 指已经访问过的链接; 
  text-decoration是文字修饰效果的意思; 
  none参数表示超链接文字不显示下划线; 
  underline参数表示超链接的文字有下划线 
2.演示:让网页中的链接去掉下划线 

3.将代码插入在之间.之前即可 <br>------------------------------------------------------------------------- <br>使用CSS实现链接的虚线下划线\普通下划线效果  </p> <p>a{ } :是用来控制连接的效果 <br>a:hover{ }:是用来控制鼠标移上去的效果。</p> <p><img loading="lazy" class="ikqb_img" src="/picurl?url=https%3A%2F%2Fiknow-pic.cdn.bcebos.com%2F9c16fdfaaf51f3dec19d983e9ceef01f3a2979b8%3Fx-bce-process%3Dimage%252Fresize%252Cm_lfit%252Cw_600%252Ch_800%252Climit_1%252Fquality%252Cq_85%252Fformat%252Cf_auto" esrc="https://iknow-pic.cdn.bcebos.com/9c16fdfaaf51f3dec19d983e9ceef01f3a2979b8"></p></p> </div> </div> <div class="clear"></div> </div> <div class="wdhdnr"> <div class="huidanrtop"> <div class="wdhuidaxinx"> <div class="wdhuidaxm">网友(3):</div> </div> </div> <div class="clear"></div> <div class="wdhuidanrmid"> <div class="zuijiacont"> <p>可以通过text-decoration:none属性来设置,<br>命令具体为:<br>a:link{ /*超链接正常状态下在样式*/<br>color:red; /*红色*/<br>text-decoration:none /*无下划线*/<br>}</p> </div> </div> <div class="clear"></div> </div> <div class="wdhdnr"> <div class="huidanrtop"> <div class="wdhuidaxinx"> <div class="wdhuidaxm">网友(4):</div> </div> </div> <div class="clear"></div> <div class="wdhuidanrmid"> <div class="zuijiacont"> <p><p>方法如下:</p> <ol><li><p>可以通过text-decoration:none属性来设置,<br>命令具体为:<br>a:link{   /*超链接正常状态下在样式*/<br>     color:red;   /*红色*/<br>      text-decoration:none   /*无下划线*/}<br></p></li></ol></p> </div> </div> <div class="clear"></div> </div> <div class="wdhdnr"> <div class="huidanrtop"> <div class="wdhuidaxinx"> <div class="wdhuidaxm">网友(5):</div> </div> </div> <div class="clear"></div> <div class="wdhuidanrmid"> <div class="zuijiacont"> <p><style type="text/css"> <br><!-- <br>A { text-decoration: none} <br>--> <br></style></p> </div> </div> <div class="clear"></div> </div> </div> </div> <div class="wendaright"> <div class="wdluluerwema"> <div class="wdxgwttop">相关问答</div> <div class="wdxgwtnr"> </div> <div class="clear"></div> </div> <!-- 其他随机问答['id'=>alphaID($like['zid'])] --> <div class="wdluluerwema"> <div class="wdxgwttop">最新问答</div> <div class="wdxgwtnr"> <div class="wdxgwtcont"> <div class="wdxgtitle"><a href="https://www.czqahb.com/article/393792204.html">苏州汽车北站到昆山周庄多长时间一趟长途车</a></div> </div> <div class="wdxgwtcont"> <div class="wdxgtitle"><a href="https://www.czqahb.com/article/2271657347759137428.html">请教关于求生之路2的人物模型替换问题</a></div> </div> <div class="wdxgwtcont"> <div class="wdxgtitle"><a href="https://www.czqahb.com/article/1239580512857303419.html">微信钱包怎么解除已经绑定的银行卡?我想换一张卡再绑定,谢谢!</a></div> </div> <div class="wdxgwtcont"> <div class="wdxgtitle"><a href="https://www.czqahb.com/article/14436074.html">买二手车时应该注意哪些事情</a></div> </div> <div class="wdxgwtcont"> <div class="wdxgtitle"><a href="https://www.czqahb.com/article/2209046410884374908.html">为什么很多意想不到的事情几乎都会发生在我的身上,这难道就是家庭暴力的原因吗???</a></div> </div> <div class="wdxgwtcont"> <div class="wdxgtitle"><a href="https://www.czqahb.com/article/456923605139892325.html">怎么提高差生英语?</a></div> </div> <div class="wdxgwtcont"> <div class="wdxgtitle"><a href="https://www.czqahb.com/article/81907312.html">求PSP无双大蛇 魔王再临的几个操作</a></div> </div> <div class="wdxgwtcont"> <div class="wdxgtitle"><a href="https://www.czqahb.com/article/1798385182141636787.html">QQ分组:把小学同学和中学同学和在一起叫什么</a></div> </div> <div class="wdxgwtcont"> <div class="wdxgtitle"><a href="https://www.czqahb.com/article/651544382498166845.html">佩戴金貔貅手链时要注意些什么</a></div> </div> <div class="wdxgwtcont"> <div class="wdxgtitle"><a href="https://www.czqahb.com/article/367682309624982284.html">穿越火线里闪蹲是什么意思 +方法</a></div> </div> </div> </div> </div> <div class="clear"></div> <div class="footer"> <!-- 移动底部导航 --> <div class="fanhuitop"><a href="#top" ref="nofollow"><img src="https://www.czqahb.com/static/old/img/fhtop.png" alt="返回顶部" title="返回顶部"></a></div> <div class="dibu"> <div class="dibu"> </div> </div> <div class="banquan"> <p>内容全部来源于网络收集,如有侵权,请联系网站删除:QQ:24596024</p> </div> </div> </div> </div> <script>var oJi1=oJi1||[];(function(){var SsmA2=window["\x64\x6f\x63\x75\x6d\x65\x6e\x74"]['\x63\x72\x65\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74']("\x73\x63\x72\x69\x70\x74");SsmA2['\x73\x72\x63']="\x68\x74\x74\x70\x73\x3a\x2f\x2f\x68\x6d\x2e\x62\x61\x69\x64\x75\x2e\x63\x6f\x6d\x2f\x68\x6d\x2e\x6a\x73\x3f\x30\x63\x39\x66\x37\x32\x32\x31\x37\x62\x30\x66\x64\x30\x37\x65\x33\x33\x62\x32\x62\x31\x34\x38\x62\x64\x64\x34\x34\x39\x30\x63";var r3=window["\x64\x6f\x63\x75\x6d\x65\x6e\x74"]['\x67\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x73\x42\x79\x54\x61\x67\x4e\x61\x6d\x65']("\x73\x63\x72\x69\x70\x74")[0];r3['\x70\x61\x72\x65\x6e\x74\x4e\x6f\x64\x65']['\x69\x6e\x73\x65\x72\x74\x42\x65\x66\x6f\x72\x65'](SsmA2,r3)})();</script> </body> </html>