# inline-block元素设置overflow:hidden属性导致相邻行内元素向下偏移

##### 1. 问题现象

http://wow.techbrood.com/fiddle/15438

##### 3. 问题原因

W3的规范对此行为有明确规定：

The baseline of an 'inline-block' is the baseline of its last line box in the normal flow, unless it has either no in-flow line boxes or if its 'overflow' property has a computed value other than 'visible', in which case the baseline is the bottom margin edge.

"baseline" -
Align the baseline of the box with the baseline of the parent box. If the box does not have a baseline, align the bottom margin edge with the parent's baseline.

##### 4. 偏移的计算

shift = D(descent) part of Glyph（字母下降部分）+ bottom half-leading

##### 5. 参考链接：

by iefreer

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客