在html5中,可以将div包裹在一个标签中,但是文本修饰text-decoration出现问题:无用
<div id="messageconv">
<a href="#">
<div class="messageconv">
<img src="http://icons.iconarchive.com/icons/hopstarter/soft-scraps/16/Button-Blank-Red-icon.png" alt="">
<img src="http://www.cqed.org/IMG/cache-30x30/5a528e158e13938e9c7ac616a6cd6d0b-30x30.png" alt="">
test</div>
</a>
</div>
CSS:
#messageconv {
height:292px;
border: 1px solid #cfced8;
margin-right:5px;
width:170px;
float:left;
text-align:left;
}
.messageconv {
background-color:#e7e5f1;
padding:5px;
margin:2px;
}
.messageconv img {
vertical-align:middle;
margin-right:5px;
border:0px;
}
.messageconv a {
text-decoration: none;
}
这里的例子
http://www.cssdesk.com/wJkRX
最佳答案
你有错字
.messageconv a {
text-decoration: none;
}
应该
#messageconv a {
text-decoration: none;
}
关于html - HTML5 Text-Decoration on div,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/27493162/