Font Awesome gives you scalable vector icons that can instantly be customized — size, color, drop shadow, and anything that can be done with the power of CSS.css
簡言之:可伸縮的圖標(矢量化),高度自定義(大小,顏色,陰影等)html
下載完畢[font-awesome-4.3.0.zip]解壓文件包括如下幾個文件夾:linux
fontawesome-webfont.ttf
(CSS引入字體)SASS和LESS都是CSS預處理器git
把CSS文件夾和fonts複製到網站根目錄(記得安裝字體)便可使用,具體看代碼示例
代碼內含註釋—應該很好理解
建議:用Chrome F12調試,一邊查看註釋一邊折騰更妙github
index.htmlweb
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Font-Awesome完整教程</title> <link rel="stylesheet" href="css/font-awesome.min.css"> <!--生產環境建議用壓縮版本,非壓縮版本建議學習使用 --> <style> * { outline: 0px; border: 0px; margin: 0px; padding: 0px; } div { border: 2px solid #882BEF; margin: 30px; width: 500px; height: auto; } ul { list-style: none; } div { border: 2px solid #882BEF; margin: 30px; width: 500px; height: auto; } .extraHeight { height: 400px; } .extraHeight ul li { margin: 10px auto; } <!--啊咧,這上面全部樣式只是讓效果顯示排版一下而增長的--> </style> </head> <body> <div class="icon-test-list"> <h1>圖標基礎樣式</h1> <ul> <li><i class="fa fa-weixin"></i>微信</li> <li><i class="fa fa-whatsapp"></i>whatsapp</li> <li><i class="fa fa-youtube"></i>youtube</li> <li><i class="fa fa-weibo"></i>新浪微博</li> </ul> </div> <div class="icon-test-list"> <h1>圖標規格樣式</h1> <span></span> <ul> <li><i class="fa fa-weixin "></i>微信</li> <li><i class="fa fa-weixin fa-lg"></i>微信lg</li> <li><i class="fa fa-weixin fa-2x"></i>微信</li> <li><i class="fa fa-weixin fa-3x"></i>微信3x</li> <li><i class="fa fa-weixin fa-4x"></i>信4x</li> <li><i class="fa fa-weixin fa-5x"></i>微信5x</li> </ul> </div> <!-- fa-lg比常規圖標大33%,而2X~5x都是常規圖標大小的倍數,具體能夠用F12調試查看計算 也能夠去查看less的規則 --> <div class="icon-test-list"> <