0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

CSSの基礎を学び直す

0
Posted at

CSSの基本ルール

セレクター(どこの){
プロパティ(何を):値(どうする);
}


h1{
color:#bb0000
}

マージンとパディングの違い
・マージンはボーダーの外側。また負の値が使える。値にautoが使える
・パディングはボーダーの内側

色んなセレクタ
id=同じid名は一つまで
class=同じclass名を何回も使える
*=全ての要素に
スペース=A B。Aの中の全てのB

=A>B。Aの一つ下の階層のB。例えばpの中にstrongとdivがあったら、strongがそれに該当する
+=A+B。Aの後に記述した同じ階層のB。Aの次に出てくるやつ。
~=A~B。Aの後に記述した全ての同階層のB

command+/でコメントアウトできる

擬似クラス
a:link ー未訪問のクラス。よくある青文字のやつ
a:visited ー訪問済みのリンク。クリックした後の色のやつ
a:hover ーホバー状態のリンク。カーソル当てた時
a:active ークリック状態のリンク。
↑この順番で記載する

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?