css - 文字装饰 : none not working

标签 css html text-decorations

完全懵了!我尝试用几种不同的方式重写 text-decoration: none 行。我还设法通过定位文本来调整文本大小,但 text-decoration: none 代码不会采用。

非常感谢帮助。

代码

.widget    
{
     height: 320px;
     width: 220px;
     background-color: #e6e6e6;
     position: relative;                              
     overflow: hidden;                          
}


.title    
{
     font-family: Georgia, Times New Roman, serif;
     font-size: 12px;
     color: #E6E6E6;
     text-align: center;
     letter-spacing: 1px;
     text-transform: uppercase;
     background-color: #4D4D4D;    
     position: absolute;
     top: 0;
     padding: 5px;
     width: 100%;
     margin-bottom: 1px;
     height: 28px;
     text-decoration: none;
}

a .title    
{
     text-decoration: none;
}
<a href="#">
    <div class="widget">  
        <div class="title">Underlined. Why?</div>  
    </div>
</a>

最佳答案

a:link{
  text-decoration: none!important;
}

=> 和我一起工作:),祝你好运

关于css - 文字装饰 : none not working,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11419998/

相关文章:

html - 如何将图像放在 Foundation 5 中居中的文本旁边?

html - 我在哪里可以找到与 Firebug 中的元素相关的 CSS 规则?

html - "text-decoration: none"不工作,即使是 "!important"

html - 没有边框底部的 CSS 下划线颜色

html - 即使我禁用了所有相关的 CSS,我网站上链接下的蓝线?

html - 部分元素不调整/保持格式以适应不同的屏幕尺寸?

css - 在循环中的图像上设置一个类

html - 文本 : decoration is not working for my link

javascript - 如何在此脚本中添加更多标题?

javascript - 基本 mouseMove 水平和垂直滚动