当你开始使用后, 你可以替换 Font Awesome 图标里面的<i>
标签内容。
许多的案例大部分都是重用 Bootstrap文档中的案例。
Place Font Awesome icons just about anywhere with the <i>
tag.
<i class="icon-camera-retro"></i> icon-camera-retro
To increase the size of icons relative to its container, use icon-large
, icon-2x
,
icon-3x
, or icon-4x
.
Increase the icon size by using the icon-large
(33% increase), icon-2x
,
icon-3x
, or icon-4x
classes.
icon-camera-retro
icon-camera-retro
icon-camera-retro
icon-camera-retro
<p><i class="icon-camera-retro icon-large"></i> icon-camera-retro</p>
<p><i class="icon-camera-retro icon-2x"></i> icon-camera-retro</p>
<p><i class="icon-camera-retro icon-3x"></i> icon-camera-retro</p>
<p><i class="icon-camera-retro icon-4x"></i> icon-camera-retro</p>
Use icon-border
and pull-right
or pull-left
for easy pull quotes or
article graphics.
<i class="icon-quote-left icon-4x pull-left icon-muted"></i>
Use a few of the new styles together ... lots of new possibilities.
<i class="icon-flag icon-4x pull-left icon-border"></i>
Use a few of the new styles together ... lots of new possibilities.
Easily replace individual bullets.
<ul class="icons-ul">
<li><i class="icon-li icon-ok"></i>Bulleted lists (like this one)</li>
<li><i class="icon-li icon-ok"></i>Buttons</li>
<li><i class="icon-li icon-ok"></i>Button groups</li>
<li><i class="icon-li icon-ok"></i>Navigation</li>
<li><i class="icon-li icon-ok"></i>Prepended form inputs</li>
<li><i class="icon-li icon-ok"></i>…and many more with custom CSS</li>
</ul>
<form>
<div class="input-prepend">
<span class="add-on"><i class="icon-envelope"></i></span>
<input class="span2" type="text" placeholder="Email address">
</div>
<div class="input-prepend">
<span class="add-on"><i class="icon-key"></i></span>
<input class="span2" type="password" placeholder="Password">
</div>
</form>
icon-spin
class to get any icon to rotate. Works well with icon-spinner
and
icon-refresh
.
<i class="icon-spinner icon-spin icon-large"></i> Spinner icon when loading content...
CSS3 animations aren't supported in IE7 - IE9.
<i class="icon-shield"></i> normal<br>
<i class="icon-shield icon-rotate-90"></i> icon-rotate-90<br>
<i class="icon-shield icon-rotate-180"></i> icon-rotate-180<br>
<i class="icon-shield icon-rotate-270"></i> icon-rotate-270<br>
<i class="icon-shield icon-flip-horizontal"></i> icon-flip-horizontal<br>
<i class="icon-shield icon-flip-vertical"></i> icon-flip-vertical
Rotating and flipping icons aren't yet supported in IE7.
icon-stack
class on the parent and
icon-stack-base
for the bottom icon.
<span class="icon-stack">
<i class="icon-check-empty icon-stack-base"></i>
<i class="icon-twitter"></i>
</span>
icon-twitter on icon-check-empty<br>
<span class="icon-stack">
<i class="icon-circle icon-stack-base"></i>
<i class="icon-flag icon-light"></i>
</span>
icon-flag on icon-circle<br>
<span class="icon-stack">
<i class="icon-sign-blank icon-stack-base"></i>
<i class="icon-terminal icon-light"></i>
</span>
icon-terminal on icon-sign-blank<br>
<span class="icon-stack">
<i class="icon-camera"></i>
<i class="icon-ban-circle icon-stack-base text-error"></i>
</span>
icon-camera on icon-ban-circle
Anything you can do with CSS font styles, you can do with Font Awesome.
Star Ratings (inspired by CSS Tricks)