Created
May 24, 2016 23:27
-
-
Save s-hiroshi/f2aa81ef21d7f15d64f1d4901b46b681 to your computer and use it in GitHub Desktop.
CSSの擬似要素before, afterでFont Awesomeのアイコンを使うサンプルです。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angle-rightを例に記載します。 | |
font-awesome.cssをangle-rightで検索すると下記の記載が見つかります。 | |
fa-angle-right:before { | |
content: "\f105"; | |
} | |
CSSは下記のように記載します。 | |
a:before { | |
content: "\f105"; | |
font-family: FontAwesome; | |
} | |
半角スページを使いたいときは16進数表記の\20を使います。 | |
a:before { | |
content: "\f105\20"; | |
font-family: FontAwesome; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment