LoginSignup
1
0

More than 3 years have passed since last update.

CSSプロパティの記述順

Posted at

CSSプロパティの記述順は、"大きい括りから小さい括りへ"

mozilla.org Base Styles 推奨

「CSSプロパティって、何から先に書いていけば綺麗なの?」
 そんな人にぜひ見て欲しい記事です!

  1. まず、要素を表示するか
    display

  2. 要素の配置場所はどこにするのか
    position float

  3. 要素のボックスモデルはどういったものにするのか
    width height margin padding border

  4. 背景はどうするか
    background

  5. テキストなどの前景にあるものはどうするか
    color font-size text-align vertical-align etc.

引用元: CSSプロパティの記述順について考えてみた

1
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
1
0