アイコンを挿入するには、インライン HTML 要素にアイコンのクラス名を追加します。
<i>
と <span>
要素が、アイコンを追加するために広く使用されています。
下のアイコンライブラリのすべてのアイコンは、CSSでカスタマイズ(サイズ、色、影等)することができる スケーラブルなベクトルアイコンです。
Font Awesome アイコンを使用するには、HTMLページの <head>
セクション内に以下の行を追加します:
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css">
注: ダウンロードもインストールも必要ありません!
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet"
href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css">
</head>
<body>
<i class="fa fa-cloud"></i>
<i
class="fa fa-heart"></i>
<i class="fa fa-car"></i>
<i class="fa fa-file"></i>
<i class="fa fa-bars"></i>
</body>
</html>
Try It Yourself »
Bootstrap グリフアイコンを使用するには、HTMLページの <head>
セクション内に以下の行を追加します:
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
注: ダウンロードもインストールも必要ありません!
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
</head>
<body>
<i class="glyphicon glyphicon-cloud"></i>
<i class="glyphicon
glyphicon-remove"></i>
<i class="glyphicon glyphicon-user"></i>
<i
class="glyphicon glyphicon-envelope"></i>
<i class="glyphicon glyphicon-thumbs-up"></i>
</body>
</html>
Try It Yourself »Google アイコンを使用するには、HTMLページの <head>
セクション内に以下の行を追加します:
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
注: ダウンロードもインストールも必要ありません!
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
</head>
<body>
<i class="material-icons">cloud</i>
<i
class="material-icons">favorite</i>
<i
class="material-icons">attachment</i>
<i
class="material-icons">computer</i>
<i
class="material-icons">traffic</i>
</body>
</html>
Try It Yourself »
全 Font Awesome アイコンの完全なリストについては、 Font Awesome アイコンリファレンスを参照してください。
全 Bootstrap グリフアイコンの完全なリストについては、 Bootstrap グリフアイコンリファレンスを参照してください。
全 Google アイコンの完全なリストについては、 Google アイコンリファレンスを参照してください。