gpt4 book ai didi

html - Safari 显示比其他浏览器更大的字体大小

转载 作者:太空狗 更新时间:2023-10-29 13:46:07 25 4
gpt4 key购买 nike

我在一个网站上工作,Mac 的 Safari 上的字体比其他浏览器上的字体大得多,

该网站使用 Google Fonts 中的“Open Sans”字体。

例如,这是标题的 CSS 片段:

h2.protitlesnbm{
color: #404040;
font-size: 22px;
text-transform: uppercase;
float: none;
}

这在 Chrome、Firefox 和 IE 上显示如下:

Example showing the text in regular font size.

但是在Mac的Safari上,是这样显示的:

The same example on Safari, now the text is bold

不知何故,Safari 似乎为所有字体添加了 1px。

谁能帮我解决这个问题?

最佳答案

你可以尝试使用

-webkit-font-smoothing: subpixel-antialiased;

-webkit-font-smoothing: antialiased;

关于html - Safari 显示比其他浏览器更大的字体大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52816071/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com