CSSで良く使うもの

フォント関連

明朝体

日本語

font-family: "游明朝", YuMincho, "ヒラギノ明朝 Pro W3", "Hiragino Mincho Pro", "HG明朝E", "MS P明朝", "MS 明朝", serif

アルファベットのみ

font-family: "Times New Roman";}

ゴシック

「游ゴシック体」「ヒラギノ角ゴ」「メイリオ」のどれを優先するか選ぶ

font-family: "游ゴシック体","Yu Gothic",YuGothic,"ヒラギノ角ゴ Pro","Hiragino Kaku Gothic Pro","メイリオ","Meiryo",sans-serif;}

NotoSans

@import url(https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;500;700;900&display=swap);

フォントファミリーの設定

font-family: "Noto Sans JP", sans-serif;

クリアフィックス

.clearfix:after { content: ""; clear: both; display: block;}

Icons - Material Design

Icons - Material Design

読込を行う

@import url(https://fonts.googleapis.com/icon?family=Material+Icons);

利用する際の縦位置を合わせる

i.material-icons { vertical-align: middle; font-size: inherit;}

使い方

<i class="material-icons">link</i>
カテゴリー: CSS

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です