css - 歌剧和@font-face

标签 css cross-browser opera font-face

我使用@font-face 将一种字体合并到我的站点中。尽管它在 ff/chome/safari 中显示良好,但在 Opera 中呈现有困难。

我正在使用 Google 的字体 API;这是在我的 html 中:

<link 
     href='http://fonts.googleapis.com/css?family=Muli' 
     rel='stylesheet' 
     type='text/css' >

然后是我的 CSS:

     /* this is whats in the linked file */
@font-face 
{   font-family: 'Muli';
    font-style: normal;
    font-weight: 400;
    src: local('Muli'), url('http://themes.googleusercontent.com/static/fonts/muli/v2/    kU4XYdV4jtS72BIidPtqyw.woff') format('woff');
        }


    /* this is the css in my site */
body
{   font-family: 'Muli', sans-serif;
        }

我不确定为什么这不起作用:API 说它适用于 Opera 10.5 及更高版本...

最佳答案

它是 font-weight: bold; 而不是 font-style: bold;font-style值为“斜体”、“倾斜”和“正常”。 font-weight可以有 "bold"、"bolder"、"lighter"、"normal"或数值 100、200、...、900。

关于css - 歌剧和@font-face,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7213769/

相关文章:

css - Div 未拉伸(stretch) - 下面重叠内容

css - 如何将 CSS 应用于 :before content? 之后的第一个字母

javascript - Opera SDK开发

css - 浏览器可移植性问题

css - 如何选择跨浏览器的样式

使用wrapInner进行jQuery滑动,然后在完成后删除

configuration-files - Opera设置 "Retarded Image Loading"的目的是什么?

javascript - 在多个元素上使用 JQuery 脚本

javascript - .onkeypress 在 chrome 和 safari 中不起作用

css - Opera 中的 SVG 使用 CSS 背景图像缩放