Font Rendering / Line-Height Issue on Mac/PC (outside of element)

前端 未结 11 2303
-上瘾入骨i
-上瘾入骨i 2020-11-27 12:45

The Design

The info widgets content should be vertically aligned in the middle as such:

\"Original

11条回答
  •  一生所求
    2020-11-27 13:36

    The Mac correctly displays the lengths below the baseline as belonging to line height. It seems that OS X counts bottom up whereas Windows calculates from the Top.

    Since 1em is the width of the capital M of the used font it is usually smaller than the font's overall height.

    Have you tried setting the line-height to be the same as the element height? This usually helps solve these kind of problems.

提交回复
热议问题