html – ‘Text-decoration:none’在Bootstrap中不起作用

前端之家收集整理的这篇文章主要介绍了html – ‘Text-decoration:none’在Bootstrap中不起作用前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
在悬停时,我的文字链接有下划线.这是Bootstrap中的默认值.

我想保留这个,除非链接在某个div内.

我尝试的代码(和几个变体)不起作用.

HTML

  1. <div class="wall-entry span5">
  2. <a href="">
  3. <img src="http://www.placehold.it/290x163" />
  4. <div class="wall-address">
  5. <p>Burgundy Street</p>
  6. <p>New Orleans,LA</p>
  7. <p>USA</p>
  8. </div>
  9. </a>
  10. </div>

我的CSS:

  1. .wall-entry {
  2. background-color: @black;
  3. position: relative;
  4.  
  5. img {
  6. opacity:0.4;
  7. filter:alpha(opacity=40); /* For IE8 and earlier */
  8. }
  9.  
  10. div {
  11. position: absolute;
  12. left: 10px;
  13. bottom: 10px;
  14. p {
  15. line-height: 18px;
  16. margin: 0;
  17. font-family: Neuzit Heavy;
  18. font-size: 18px;
  19. color: white;
  20. text-decoration: none;
  21. }
  22. }
  23. }
  24.  
  25.  
  26. div.wall-entry:hover img {
  27. opacity:1;
  28. filter:alpha(opacity=100); /* For IE8 and earlier */
  29. }
  30.  
  31. a div.wall-entry {text-decoration: none;}

快速说明:我测试过{text-decoration:none;},这确实有效.但是,我不想改变一切.只是这个特定情况下的链接.

解决方法

@H_404_19@ 将font-family放在包含多个单词的字体的引号中,首先:

font-family:“Neuzit Heavy”,sans-serif;

然后在一个put .wall-entry下面a:hover {text-decoration:none; }

您已切换订单.您要定位的项目应该在右侧.例如,

.wrapper .header a in english表示“定位.header内部的所有锚链接,位于.wrapper内”

猜你在找的HTML相关文章