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

【reset.css】chromeのデベロッパーツールで表示される”user agent stylesheet”によりCSSが適用されない状態を解消する。

Last updated at Posted at 2020-03-06

問題

模写コーディングをしていると、CSSが適用されないことがあり、chromeのデベロッパーツールで確認すると、”user agent stylesheet”によって打ち消されていることがわかった。

原因

 ”user agent stylesheet”はブラウザ毎のデフォルトのCSS設定である。

対策

 このデフォルトのCSS設定を解消し、まっさらな状態で模写コーディングを始めるには、リセットCSSというものによって、そのデフォルトのCSSを打ち消して、表示を揃えてからコーディングを進める必要がある。
 またreset.cssには種類があり状況によって選択する必要がある。
 
すべてリセットするタイプ

・Eric Mayer’s Reset CSS 2.0
・HTML5 Doctor Reset CSS

デフォルトのスタイルが当てられるタイプ

・Normalize.css
・ress
・Reboot.css

また、2019年で人気なのは

であるが、Eric Meyer’s “Reset CSS” 2.0はHTML5に対応していない為、HTML5 Doctor Reset CSSを使うほうが良いとのことだった。

参考文献

この記事は以下の情報を参考にして執筆しました。

1
0
1

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?