IE9 text rendering issue - tails on letters cut off

我是研究僧i 提交于 2019-12-12 09:33:33

问题


I'm running into an issue where - in IE9 standards mode - IE9 renders text in such a way that the tails on descending letters - "q, p, y" etc - disappear. Have tried playing with padding and other common CSS settings in helps of fixing this but am having no luck so far.

Who's got an idea what this might be?


回答1:


EDIT: I found this on a blog. The link isn't live anymore. Leaving it here just in case it pops up again.

Its as though the text is a node inside the input and the line-height has been set on that inner element, with the surrounding element clipping the overflowing text.

The solution is simple, set the line-height to be “1” (no-units)




回答2:


Are you using a custom font (@font-face) as i found that sometimes when using that on certain sizes it would cut off the tails on text, regardless of line-height




回答3:


I just had this problem using font: inherit on input. Declared the actual fonts I wanted (Verdana primarily) and the tails are visible again.

Also tested line-height on input—but that caused the problem again.

This is what I ended up with:

body, button, input, select, textarea {
    font-family: Verdana, Helvetica, Arial, sans-serif;
    font-size: 100%;
}
body {
    line-height: 1.5;
}



回答4:


This setting the line-height:inherit on input boxes did the trick for me.

input[type="text"], input[type="email"], input[type="password"], {
  line-height: inherit; /* for i.e. */
}


来源:https://stackoverflow.com/questions/6024221/ie9-text-rendering-issue-tails-on-letters-cut-off

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