Safari 为 Safari 5.0.x 中的所有字体显示 Times New Roman [英] Safari is displaying Times New Roman for all fonts in Safari 5.0.x

查看:59
本文介绍了Safari 为 Safari 5.0.x 中的所有字体显示 Times New Roman的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站以 Times New Roman 显示所有字体,即使我的 CSS 中没有该声明.

这仅在 OS X 上的 Safari 5.0.5 中发生.检查文本元素时,它会显示font-family:Times New Roman".

字体在 5.1 中正确显示

可能是什么问题,如何解决?

解决方案

如果您的 CSS 中没有声明字体,浏览器可能会尝试应用其默认字体.

为避免这种情况,您可以执行以下操作:

html{字体系列:Arial、Helvetica、Verdana;}

但是,如果您确实为元素声明了 font-family,则可能是某些小部件或外部 CSS 覆盖了您的 CSS,请尝试摆脱这些以加快调试速度.>

My site is displaying all fonts in Times New Roman even though that declaration is nowhere in my CSS.

This only happens in Safari 5.0.5 on OS X only. When inspecting a text element, it says "font-family: Times New Roman".

The fonts are displayed correctly in 5.1

What could be the problem, and how can this be fixed?

解决方案

If you have no fonts declared in your CSS, The browser may try to apply its default font.

To avoid that, you may do something like:

html{
 font-family:Arial, Helvetica, Verdana;
}

However, If you do have font-family declared for your element, it may be some widget or external CSS that overwrites your CSS, Try to get rid of these for a quicker debugging.

这篇关于Safari 为 Safari 5.0.x 中的所有字体显示 Times New Roman的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆