Eric Meyer 更新 style resetting

Resetting Again這篇文章中,Eric Meyer更新了好幾個月沒修改過的style resetting(好像一直沒正式的名稱),真的改的地方其實不多,主要的修改是原來是設定為繼承的幾個地方,其他還有一些小變動,以下是完整code:

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%;
	vertical-align: baseline;
	background: transparent;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}

/* remember to define focus styles! */
:focus {
	outline: 0;
}

/* remember to highlight inserts somehow! */
ins {
	text-decoration: none;
}
del {
	text-decoration: line-through;
}

/* tables still need 'cellspacing="0"' in the markup */
table {
	border-collapse: collapse;
	border-spacing: 0;
}

給不知道這是什麼的人

這段CSS是用來把各種瀏覽器的預設樣式覆蓋掉,把整個網頁變成沒有樣式的狀態,h1、h2、p等標籤都會是一樣大小的字體、字集,使用方法就是在任何你自己的CSS之前先在網頁上套用這段CSS。

comments powered by Disqus