New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css] 第20天 要让Chrome支持小于12px的文字怎么做? #67
Comments
1, 改用图片 |
* {
-webkit-text-size-adjust: none;
} |
Chrome 中有最小字号的限制,一般为 12px。原因是 Chrome 认为小于这个字号会影响阅读。 当需要小于 12px 字体的时候,有以下几个方法可以使用。
最好的办法还是进行切图,或者就不要使用小于 12px 的字体。 |
|
transform: scale() |
1.用图片2.-webkit-text-size-adjust:none;这个属性在高版本(27后)的 Chrome 中已经被废除 #chrome10px{
-webkit-text-size-adjust:none;
font-size:10px;
} 3. transform: scale(0.5, 0.5)需要注意以下几点:
.px12 {
font-size: 12px;
}
.px9 {
font-size: 9px;
display: inline-block;
-webkit-transform: scale(0.75); /* 12*0.75=9 */
}
.px6 {
font-size: 6px;
display: block;
-webkit-transform: scale(0.5); /* 12*0.5=6 */
float: left;
} |
1.使用zoom |
常见的解决方案有: |
第20天 要让Chrome支持小于12px的文字怎么做?
The text was updated successfully, but these errors were encountered: