我想在我的网站上使用谷歌的Roboto字体,我正在遵循这个教程:
http://www.maketecheasier.com/use-google-roboto-font-everywhere/2012/03/15
我下载了一个文件夹结构如下的文件:
现在我有三个问题:
media/css/main.css
URL中有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;
}
如果我想拥有如下的dir结构,那么我的url应该是什么样子的:
/media/fonts/roboto
你真的不需要做这些。
Roboto
该页面将提供一个元素以包含在页面中,并提供一个示例
font-family
规则列表以在CSS中使用。
这样使用谷歌的字体可以保证可用性,并减少您自己服务器的带宽。