font-weight over a font-face不工作? [英] font-weight over a font-face not working?

查看:132
本文介绍了font-weight over a font-face不工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想让文字更薄,我已经看到它在网站上正常工作。 http://www.freshthemes.net/demo/backbone/about-us/ 公司概览

I am trying to make a text thinner and i have seen it working properly on a website. http://www.freshthemes.net/demo/backbone/about-us/ (Under company overview)

这是我使用的样式:

.intro p{
    text-align: justify;
    margin-bottom: 8px;
    line-height: 22px;
    margin-bottom: 8px;
    font: 17px/21px "Open Sans", Arial, "HelveticaNeue", "Helvetica Neue", Helvetica, sans-serif;
    font-style: normal;
    font-variant: normal;
    font-weight: 300;
    color:#656565;
}

字体载入:

<link rel='stylesheet' id='google_webfont_OpenSans-css'  href='http://fonts.googleapis.com/css?family=Open+Sans' type='text/css' media='all' />

这个东西, font-weight 没有任何效果。它不介意,如果我将它设置为300或不。 (它不应该在以前的网站上工作)

The thing, font-weight property seems not to have any effect. It doesn't mind if I set it to 300 or not. (and it shouldn't, on the previous site its working)

这是我的身体:

<div class="intro">
    <p>
        This is the text that should be thinner
    </p>
</div>

我缺少什么?

推荐答案

您不是加载每个字体权重。您应该尝试类似的操作:

You are not loading every font-weights. You should try something like that :

<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700,800' rel='stylesheet' type='text/css'>

您可以根据您的需要在此Google页面上自定义所有您需要的字体如果您加载的字体太多,则会显示网站速度):
http:// www .google.com / webfonts#UsePlace:use / Collection:Open + Sans

You can customize it to your need on this google page by checkig all fonts that you need (but watch out for site speed if you load too much fonts !): http://www.google.com/webfonts#UsePlace:use/Collection:Open+Sans

这篇关于font-weight over a font-face不工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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