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 ``. 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: 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 答疑

评论 抢沙发

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

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