当链接css的显示属性为flex时,我会遇到一些麻烦:链接的子元素不能覆盖text-decoration属性。
示例:http://jsfiddle.net/wu627vn3/
.test{
text-decoration:none;
display:inline-block;
color: red;
}
<a href="#" style="display: flex;">
<div class="test">
This isn't.
</div>
<div class="test">
This isn't.
</div>
</a>
答案 0 :(得分:2)
您必须添加text-decoration
进行定位
.test {
display: inline-block;
color: red;
}
a {
text-decoration: none
}
<a href="#" style="display: flex;">
<div class="test">
This isn't.
</div>
<div class="test">
This isn't.
</div>
</a>