Vertical-alignment issues with Helvetica Neue

送分小仙女□ 提交于 2019-12-24 00:22:42

问题


This is a minor but persistant annoyance with Helvetica Neue (doesn't happen w Arial)

Text that is perfectly vertically aligned will shift downward slightly when any part of the text is bolded. While it's a small shift, it ruins alignment when mixing bold and non-bold text elements side by side.

See http://jsfiddle.net/ZZ3m6/7/ for example.

Even when explicitly setting line-heights, the shift occurs. How can I stop this?


回答1:


My experience is not to even bother with Helvetica Neue. Macs come preinstalled with Helvetica anyway and it doesn't have that offsetting issue with bold text that Helvetica Neue has.

Edit: Here's a related question that has some CSS hackery you can use to fix the issue: Helvetica Neue baseline rendering problem with Firefox/Mac




回答2:


The original problem here is fixed in newer versions of Chrome. Tables can still cause trouble when set to vertical-align: top: http://jsfiddle.net/nwXHG/

Solution: change to vertical-align: middle.



来源:https://stackoverflow.com/questions/11618206/vertical-alignment-issues-with-helvetica-neue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!