10
9

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 5 years have passed since last update.

30秒で読める超基本的なcssの書き方

Last updated at Posted at 2014-10-07

以下の100の部分を赤に変えたい場合のcssの良い書き方

<p id="amep"><span>100</span></p>

[ダメな例]
html

<p id="amep"><span id="red">100</span></p>

css

# red{
 color:red;
}

[良い例]
css

# amep span{
 color:red;
}

このようにできるだけタグで指定してあげた方が良いです。

10
9
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
10
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?