相关疑难解决方法(0)

如何在网站上使用Google的Roboto字体?

我想在我的网站上使用Google的Roboto字体,我正在关注本教程:

http://www.maketecheasier.com/use-google-roboto-font-everywhere/2012/03/15

我已经下载了具有如下文件夹结构的文件:

在此输入图像描述

现在我有三个问题:

  1. 我的media/css/main.css网址中有css .那么我需要将该文件夹放在哪里?
  2. 我是否需要从所有子文件夹中提取所有eot,svg等并放入fonts文件夹?
  3. 我是否需要创建css文件fonts.css并包含在我的基本模板文件中?

他使用这个例子

@font-face {
    font-family: 'Roboto';
    src: url('Roboto-ThinItalic-webfont.eot');
    src: url('Roboto-ThinItalic-webfont.eot?#iefix') format('embedded-opentype'),
         url('Roboto-ThinItalic-webfont.woff') format('woff'),
         url('Roboto-ThinItalic-webfont.ttf') format('truetype'),
         url('Roboto-ThinItalic-webfont.svg#RobotoThinItalic') format('svg'); (under the Apache Software License). 
    font-weight: 200;
    font-style: italic;
}
Run Code Online (Sandbox Code Playgroud)

我的网址应该是什么样子,如果我想要像dir结构那样:

/media/fonts/roboto

html css fonts

139
推荐指数
6
解决办法
42万
查看次数

标签 统计

css ×1

fonts ×1

html ×1