CSS 权威指南"基本视觉格式化"一章中讲到: 对于行内非替换元素或者匿名文本来说, font-size 指定了它们的 content area 的高度, 由于 inline box 是由 content area 加上上下的 half-leading 构成的, 那么如果元素的 leading 为 0, 在这种情况下, font-size 指定了 inline box 的高度.
<div style="background-color: teal;">
<span style="font-size: 80px; line-height: 1em; background-color:grey; opacity: 0.7; padding: 0">Lorem maiores atgfyq.</span>
</div>
以上的例子, font-size 和 line-height 都设置为 80px, 按理说 span 的 inline box 就是 80px.
但是从开发者工具看, 拥有绿色背景的 div 的高度才是 80px, 不懂为什么 span 的高度要比 80px 大呢?



