导入和使用google webfont [英] Import and use google webfont

查看:167
本文介绍了导入和使用google webfont的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于一个项目,我必须使用很多风格的字体。
以下是 Google字体的链接

For a project, I have to use many style off a font. Here is the link of the google font

这是我的css导入

@import url(http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,300,400,700);

我想知道的是如何定义font-family来显示例如打开Sans Light 300斜体

What I would like to know is how can I define the font-family to display for example the "Open Sans Light 300 Italic"

感谢

推荐答案

CSS

CSS

@import url(http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,300,400,700);
        body {
            font-family: 'Open Sans', sans-serif;
        }

        body p {
            font-style: italic;
            font-weight: 300; /* You specify the number you see next to the fonts to change from light to bold ie you would put 700 etc. etc. */
        }

这篇关于导入和使用google webfont的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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