Bil*_*lly 31 css 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)
不同浏览器的结果:
小智 29
按照样式禁用自动调整.
* {
-webkit-text-size-adjust: none;
}
Run Code Online (Sandbox Code Playgroud)
Jas*_*key 13
-webkit-text-size-adjust
在Chrome 27之后不再有效.
尝试使用transform
强制缩小字体大小.
font-size:12px;
transform: scale(0.833);/*10/12=0.833, font-size:10px*/
Run Code Online (Sandbox Code Playgroud)
根据http://www.google.com/support/forum/p/Chrome/thread?tid=389f306a52817110&hl=zh-CN Chrome支持最小字体大小.如果你"Documents and Settings\User_Name\Local Settings\Application Data\Google\Chrome\User Data\Default\Preferences"
在文本编辑器中打开,你会看到类似下面的内容吗?:
"webkit": {
"webprefs": {
"default_fixed_font_size": 11,
"default_font_size": 12,
"fixed_font_family": "Bitstream Vera Sans Mono",
"minimum_font_size": 12,
"minimum_logical_font_size": 12,
"sansserif_font_family": "Times New Roman",
"serif_font_family": "Arial",
"standard_font_is_serif": false,
"text_areas_are_resizable": true
}
}
Run Code Online (Sandbox Code Playgroud)
关闭Chrome,更改最小字体大小以及重新启动Chrome可能会有所帮助.
Chrome 有最小字体大小设置。我的设置为 11px(默认情况下),所以我必须更改它才能查看较小的字体大小。
要更改 Chrome 中的最小字体大小,请转到:设置 > 高级设置 > 网页内容 > 字体大小 > 自定义字体 > 向下滚动到底部,您将看到“最小字体大小”滑块。
归档时间: |
|
查看次数: |
44651 次 |
最近记录: |