css resetリセットスタイルはそんなに重要ですか?
以前htmlコードを書いたとき、headにリセットスタイルresetを追加するのが一般的でした.css、その内容は以下の通りです.
@charset "utf-8";
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
}
table {
border-collapse:collapse;
border-spacing:0;
}
fieldset, img { border:0;}
address, caption, cite, code, dfn, em, strong, th, var {
font-style:normal;
font-weight:normal;
}
ol, ul { list-style:none; }
caption, th { text-align:left; }
h1, h2, h3, h4, h5, h6 {
font-size:200%;
font-weight:normal;
}
:focus { outline: 0;}
a{ text-decoration:none;}
a:hover img{ border:none;}
a:active{noOutline:expression(this.onFocus=this.blur());}
.clearfix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.clearfix {display: inline-block;}
html .clearfix { height: 1%;}
.clearfix {display: block;}
*html img.png{
_background-image: expression(this.runtimeStyle.backgroundImage = "none",this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "', sizingMethod='image')",this.src = "http://i0.itc.cn/20101019/848_0a785a7b_1118_4825_85dc_e8696988c94b_0.gif");
}
, 。 ?
?
CSS reset CSS , “ ”!
:
*{ margin:0; padding:0; }
。
:
-
div
ラベルのデフォルト はmargin
ですか?padding
の はありますか?div{margin:0; padding:0;}
のプロパティを することをどのように えますか? えはないに いない.
-
dt
ラベルデフォルトのmargin
とpadding
の が0
ですが、 を うのでしょうか. -
li
ラベルのデフォルト はmargin
ですか?padding
の はありますか?いいえ! -
code
ラベルはinline
レベルの で、margin
とpadding
のリセットにも っ って、 ありません. -
fieldset
、l egend
の2つの90 のラベルあなたのウェブサイトで しましたか? が1% のラベルを ってもリセットする はありません.
cssは にリセットしてもいくつかのよく われるラベルだけで、あなたのページは にどんなラベルを いますか? body, dl, dd, h1, h2, h3, h4, h5, h6, p, form{margin:0;}
ol,ul{margin:0; padding:0;}
CSS reset , , , 。
css , , , 。
reset.css
でリセットされる は、Normalize.css
である. の でその い などを べておきます.