我们可以禁用带下划线的锚标记的内部跨度元素的下划线吗?如果可能,请告诉我如何?
<a>hello<span>praveen</span</a>
<style type="text/css>
a{
text-decoration:underline;
}
a span{
text-decoration:none;
}
</style>
Run Code Online (Sandbox Code Playgroud)
尝试这个。
添加display: inline-block;跨度样式
a {
text-decoration:underline;
}
a span {
text-decoration:none;
display: inline-block;
}
Run Code Online (Sandbox Code Playgroud)
http://jsfiddle.net/4oqyx6Le/2/
| 归档时间: |
|
| 查看次数: |
1516 次 |
| 最近记录: |