html:
<li>
<a href="">text<span></span></a>
</li>
css:
ul{
list-style:none
}
li{
float: left
}
a{
padding: 10px;
border: 1px solid #000;
}
In chrome the right border doesn't show up:
image: i.imgur.com/OycFyOk.png
FF and Safari works fine.
Example code in fiddle:
You need to put display: block; to the "a" element:
a { display: block; }
删除HTML上的Empty span标签应该是对此的最快解决方法。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.