CSSアイコンとは何ですか?
アイコンは、CSSでカスタマイズできるスケーラブルなベクターライブラリで提供されます
一般的なライブラリは次のとおりです。
- FontAwesomeアイコン
- ブートストラップアイコン
- Googleアイコン
方法?
<head>
アイコンを使用するには、HTMLページのセクションにアイコンライブラリへのリンクを追加するだけです。
ダウンロードやインストールは必要ありません!
アイコンを挿入するには、アイコンクラスの名前をまたはなどのインラインHTML要素に追加し<i>
ます<span>
。
FontAwesomeの例
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.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>
アイコン(Font Awesome、Bootstrap、Google)の完全なリストについては、W3Schoolの アイコンリファレンスにアクセスしてください。
ブートストラップの例
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/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>
Googleの例
<!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>
フルアイコンチュートリアル
これはアイコンの簡単な説明です。
完全なアイコンチュートリアルについては、W3Schoolsアイコンチュートリアルにアクセスしてください。
完全なアイコンリファレンスについては、W3Schoolsアイコンリファレンスを参照してください。