【发布时间】:2019-04-30 22:44:57
【问题描述】:
此 CSS 和 HTML 显示三个文本框,当在 IE 和 Edge 中查看时,它们的边框完全包裹起来。在 Chrome(或我的 Android 浏览器)中查看时,边框的右侧会被剪掉。
我可以通过在每个跨度后面添加一个尾随“ ”来使其工作,但我宁愿了解我是否做错了什么......
<html>
<body>
<style>
.link-bubble {
float:none;
white-space:nowrap;
border: thin solid blue;
border-radius:10px;
background-color:antiquewhite;
padding:4px 6px 6px 6px;
margin:2px;
}
</style>
<div style="float:right; width:30%; text-align:center; line-height:40px;">
<span class="link-bubble">
<a href="/Services/target1">First service offered</a>
</span>
<span class="link-bubble">
<a href="/Services/target2">Second service offered</a>
</span>
<span class="link-bubble">
<a href="/Services/target3">Third service offered</a>
</span>
</div>
</body>
</html>
【问题讨论】:
-
似乎与
div上的width:30%;有关。
标签: html css google-chrome internet-explorer microsoft-edge