我使用css @ font-face函数来定义自定义字体。这个字体被称为“Myriad Pro Bold”,作为后备我使用Arial/Sans-Serif。如果@ font-face不起作用,以粗体显示文本
@font-face { font-family: MyriadProBold; src: url('fonts/myriadpro_bold.otf'); }
h3 { font-family: MyriadProBold, Arial, Sans-Serif; }
font-weight:bold;元素仅在显示Arial或另一种Sans-Serif字体时需要。如果我加font-weight:bold;添加到标签和MyriadProBold加载时,粗体字变得更粗大,看起来很丑。
所以实际上我在寻找这样的事情
if h3 font is MyriadProBold
font-weight: normal;
else
font-weight: bold;
帮助表示赞赏,谢谢!
所以,基本上你需要等待字体加载,或者还有其他问题? – GNi33 2013-03-22 02:56:58