Font Awesome

最近晚上再帮一家start up 写 lander,以前习惯了直接使用bootstrap 以及他上面的Glyphicons  icon,很方便就可以使用的。

但是现在写的这个lander 没有使用bootstrap,所以想使用 Glyphicons 的icon 就会比较麻烦。两个办法,一是接从 bootstrap 的cdn 中 截出icon 的那部分,抑或使用其他的 icon library。 第一个办法 maxcdn 提供了直接 cdn 文件,不过版本比较老,仍然可用:

<link href=”//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css” rel=”stylesheet”>

 

第二个办法是直接使用其他的免费库,比如说 font awesome icon.

http://fortawesome.github.io/Font-Awesome/

使用这个库很简单,首先在你的css 文件上引入如下的 css

<link href=”//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css” rel=”stylesheet”>

然后就可以在css 中调用他们的library,例如如下:

<i class=”fa fa-camera-retro”></i> fa-camera-retro

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.