我很惊讶在谷歌中没有看到这个问题的搜索结果:)。如果您打开这个 w3schools 链接 ( https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_abbr_test ),您可以看到 IE 在缩写词“WHO”下没有显示任何行,而其他浏览器做。我不想添加明确的边框底部:1px dotted #color,因为当表格的其他单元格中的文本换行为多行时,应用程序添加的边框底部将被推得很远,而不是直接留在缩写下方标记的词。我想知道为什么 IE 不显示 abbr 标签下的行。谢谢你的时间!
这是第二期的代码笔(margin-bottom 问题:IE 中的 auto)。如果将大小缩小到 750px 以下,可以看到 abbr 标签下的线是如何移开的。如果您取消注释我添加的 abbr[title] 下的样式并重试,则该问题在 IE 以外的其他浏览器中得到修复。https://codepen.io/Sankaryc/pen/aGOqoZ
HTML:
<div>
<div class="flex-row">
<div class="flex-basis-9">
<label>Field1</label>
</div>
<div class="flex-basis-24">Value1 </div>
<div class="flex-basis-9">
<label>Field2</label>
</div>
<a href="/some-url">dummy url</a>
<abbr title="StackOverflow" tooltipPosition="bottom">SO</abbr>
<div class="flex-basis-9"></div>
<div class="flex-basis-9">
<label>Field3</label>
</div>
<div class="flex-basis-24">Value3 </div>
</div>
CSS:
div {
padding-right:2px;
}
.flex-row {
display:flex;
line-height:1;
width:100%;
margin-top:3px;
}
.flex-basis-9 {
flex-basis:9%;
}
label {
padding: 0;
}
.flex-basis-24 {
flex-basis:24.33%;
}
abbr[title] {
cursor: help;
border-bottom: 1.5px dotted #000 !important;
text-decoration: none !important;
/*margin-bottom:auto */
}
a {
padding-right: 10px;
}