相关疑难解决方法(0)

字体大小<12px在Google Chrome中无效

css font-size <12px的元素在谷歌浏览器中没有效果 - 字体大小为12px.

我该怎么办?

我的Google Chrome浏览器使用默认设置.我的版本是4.0.249.89.我使用的是Windows XP.

您可以将以下代码粘贴到Google Chrome中进行测试:

<html>
<body>
<p style="font-size:6px;">test 6px</p>
<p style="font-size:7px;">test 7px</p>
<p style="font-size:8px;">test 8px</p>
<p style="font-size:9px;">test 9px</p>
<p style="font-size:10px;">test 10px</p>
<p style="font-size:11px;">test 11px</p>
<p style="font-size:12px;">test 12px</p>
<p style="font-size:13px;">test 13px</p>
<p style="font-size:14px;">test 14px</p>
<p style="font-size:15px;">test 15px</p>
<p style="font-size:16px;">test 16px</p>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

不同浏览器的结果: https://i178.photobucket.com/albums/w258/neodeep2001/chrome-font-size-diff.jpg

css google-chrome

31
推荐指数
4
解决办法
4万
查看次数

不再支持-webkit-text-size-adjust,如何将font-size设置为小于12px

当我将我的chrome更新到28.0.1500.11 dev-m时,我发现:

-webkit-text-size-adjust:none;
Run Code Online (Sandbox Code Playgroud)

不再支持,我在这里找到了changlist http://trac.webkit.org/changeset/145168

当我像这样设置CSS时,它在chrome中不起作用:

font-size:10px;//number less than 12
Run Code Online (Sandbox Code Playgroud)

在chrome(版本:28.0.1500.11 dev-m)中它的字体大小也是如此 12px

我试过这个:

font-size:10px;
-webkit-transform:scale(0.83);
display:inline-block;
Run Code Online (Sandbox Code Playgroud)

我知道这可能不是解决这个问题的正确方法

谢谢您的帮助

css webkit font-size

7
推荐指数
1
解决办法
1万
查看次数

标签 统计

css ×2

font-size ×1

google-chrome ×1

webkit ×1