。-webkit-font-smoothing: subpixel-antialiased;
-webkit-font-smoothing: antialiased;
您可以始终使用JavaScript检查浏览器是否为Safari,如果是,则通过1px
最小化字体大小。我知道这不是一种常规的做法,但只要它能够工作:
var isSafari = /constructor/i.test(window.HTMLElement) || (function (p) {
return p.toString() === "[object SafariRemoteNotification]";
})(!window['safari'] || (typeof safari !== 'undefined' && safari.pushNotification));
SafariRemoteNotification
,它是在版本7.1之后引入的,以涵盖从3.0及以上版本的所有Safari。为了改变字体大小,有一种已弃用的方法仍然可以使用:
document.body.fontSize(-1);
document.body.style.fontSize = ""; //Either Enter Percentages (90%) or EM
//EM Will Automatically Change Font-Size According To Browser
//%-ages Will Change Values Through Math (110% of 16px)
也许你只需要确保所有浏览器中的字体重量相同。
你可以尝试类似以下的方法:
h2.protitles{
color: #404040;
font-size: 22px;
text-transform: uppercase;
float: none;
font-weight: 400; /* This should be the normal font-weight in Chrome */
}