完全懵了!我尝试用几种不同的方式重写 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/