在 :after/ :before 使用 font awesome web Icon

.element {
    position: relative;
}
 
/*replace the content value with the
corresponding value from the list below*/
 
.element:before {
    content: "\f000";
    font-family: FontAwesome;
    font-style: normal;
    font-weight: normal;
    text-decoration: inherit;
/*--adjust as necessary--*/
    color: #000;
    font-size: 18px;
    padding-right: 0.5em;
    position: absolute;
    top: 10px;
    left: 0;
}

 

 

 

来源: http://astronautweb.co/snippet/font-awesome/

posted @ 2015-01-07 15:19  夏夏夏夏夏夏夏  阅读(1644)  评论(0编辑  收藏  举报
© 2014 Tea.Fish Do't Retain Any Rights. 版权没有,随意粘贴