Vertical alignment text in container WebKit vs Firefox

The problem is that Firefox and WebKit based browsers seem to align text vertical in different way when contained in a element that have a even height/line-height and the font-size is uneven (or vice versa). I have looked at some similar thread, but I haven't really seen any great explanation for my question. Consider `http://alternativeto.net/test2.htm`. This is a really simple page with just .box { font-size: 15px; font-family: Helvetica, Arial; background-color: Blue; height: 20px; width: 60px; color: White; line-height: 20px; } And
A text.
If you open that page up in Chrome and Firefox you notice that they align the texts in different ways: http://screencast.com/t/tjgA2d7T Is there any way to fix this? Is there any "text-align" property or something that I missed?

以上就是Vertical alignment text in container WebKit vs Firefox的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » CSS3 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏