And*_*eas 26 html css safari ios
我想我已经在移动(iOS 8)Safari中发现了Google字体的Web渲染错误.在我看来,Mobile Safari为使用Google字体的所有文本添加了一点字母间距,或者它使用了另一种字体.我尝试使用哪种Google字体无关紧要(Open Sans).它在所有现代浏览器上都能正确呈现.经过测试的Android,FF,Chrome,Safari.
尝试在iOS设备上加载此页面以查看我的意思.另请参阅代码和屏幕截图.请访问此链接进行实时审核:https://dl.dropboxusercontent.com/u/430406/Temp%20%5Bok%20to%20delete%5D/Checking%20Font/index.html
<!DOCTYPE html>
<html>
<head>
<title></title>
<link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
</head>
<body>
<h2 style="font-family: 'Roboto'">Roboto: Looks like it gets a bit extra line-spacing in iOS Safari, though this is not possible to find in web inspector</h2>
<h2 style="font-family: 'Arial'">Arial: Works fine in iOS Safari</h2>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
And*_*eas 47
我在这个问题中找到了解决方案:iOS 4.2+ webfont(ttf)的粗体字体重量渲染错误
如果您没有设置字体权重(例如.font-weight: 400
或font-weight: normal
),Mobile Safari会出现虚假的字体权重.您需要专门设置css字体权重,以便在移动Safari中正确呈现.
这是解决方案.
h2 {
font-weight: 400;
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
16876 次 |
最近记录: |