Zo7*_*o72 3 css fonts font-awesome
对于一些简单的html页面,我想使用Fontaweseome而不需要下载它.
我想让我的CSS指向/ fontFace像这样:
(即:直接到github URL)
@font-face {
font-family: 'FontAwesome';
src: url('http://fortawesome.github.io/Font-Awesome/assets/font-awesome/font/fontawesome-webfont.eot?v=3.2.1');
src: url('http://fortawesome.github.io/Font-Awesome/assets/font-awesome/font/fontawesome-webfont.eot?#iefix&v=3.2.1') format('embedded-opentype'), url('http://fortawesome.github.io/Font-Awesome/assets/font-awesome/font/fontawesome-webfont.woff?v=3.2.1') format('woff'), url('http://fortawesome.github.io/Font-Awesome/assets/font-awesome/font/fontawesome-webfont.ttf?v=3.2.1') format('truetype'), url('http://fortawesome.github.io/Font-Awesome/assets/font-awesome/font/fontawesome-webfont.svg#fontawesomeregular?v=3.2.1') format('svg');
font-weight: normal;
font-style: normal;
}
Run Code Online (Sandbox Code Playgroud)
我做了......但它似乎没有用.
没有错误,但是这样的事情:
<i class="icon-bar"></i>
Run Code Online (Sandbox Code Playgroud)
哪里
<style>
i { font-family: 'FontAwesome', sans-serif; }
</style>
Run Code Online (Sandbox Code Playgroud)
未按预期呈现
Min*_*lsh 11
Font Awesome包含在Bootstrap的CDN中.您只需在头部添加以下链接即可
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
Run Code Online (Sandbox Code Playgroud)
就是这样,你可以享受你的偶像.你不应该使用font-face或在任何地方调用它,只需按照常规方式将适当的类添加到'i'标签中:
<i class="fa fa-download"></i>
Run Code Online (Sandbox Code Playgroud)
见http://fortawesome.github.io/Font-Awesome/get-started/
| 归档时间: |
|
| 查看次数: |
14113 次 |
| 最近记录: |