-webkit-text-size-adjust is no longer supported,how to set font-size to less than 12px

喜欢而已 提交于 2019-12-08 18:16:24

问题


When I update my chrome to 28.0.1500.11 dev-m, I found that:

-webkit-text-size-adjust:none;

is no longer supported,and I found the changlist here http://trac.webkit.org/changeset/145168

It`s not work in chrome when I set the CSS like this:

font-size:10px;//number less than 12

In chrome (version:28.0.1500.11 dev-m) the font-size it`s also 12px

I tried this:

font-size:10px;
-webkit-transform:scale(0.83);
display:inline-block;

I know it`s maybe not the right way to fix that issue

thank you for your help


回答1:


This trick helped me to solve:

Setting a max-height greater then the elements height on one of the parents elements seems to resolve this issue.

Found here: http://davemacaulay.com/webkit-text-size-adjust-doesnt-work-on-android-chrome/




回答2:


It's better to set your font's in em units, especially for mobile. This way you can easily target all em's with an media query or something. http://www.w3schools.com/cssref/css_units.asp



来源:https://stackoverflow.com/questions/16589785/webkit-text-size-adjust-is-no-longer-supported-how-to-set-font-size-to-less-tha

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