【发布时间】:2013-02-21 09:07:23
【问题描述】:
我将 Arial 作为我的基本字体,我正在尝试为页面的不同部分使用各种字体粗细(普通、粗体/700 和 900)
这似乎在 Firefox 和 Internet Explorer 中都可以正常工作,但在 Google chrome 中,粗体/700 和 900 之间似乎完全没有区别!?
(以防上述链接损坏/无效)
HTML:
<p id="one">Testing</p>
<p id="two">Testing</p>
<p id="three">Testing</p>
CSS:
p { font-family: arial; font-size: 40px; margin: 0; }
#one { font-weight: normal; }
#two { font-weight: 700; }
#three { font-weight: 900; }
我用谷歌搜索了一下,找到了一个similar question,它提供了一个半有用的答案:
解决方法:
字体粗细:900; font-family: "Arial Black", Arial, sans-serif;
但使用上述简单方法会使所有内容在 Chrome 中假设 font-weight 为 900(即使另有指定)
以see here 为例(显然在 Chrome 中)
这是 Chrome 中的错误吗?还是我在这里做错了什么?
【问题讨论】:
-
在 Linux 上的 Firefox 中,
font-weight: 700和900之间也没有区别。
标签: html css google-chrome fonts