reset.css
每个页面的样式,想必reset.css扮演了一个很重要德角色,reset的好坏,决定了你的开发效率和作品质量
最近研究了下淘宝的reset 和 国外的一个公认的最好的reset,最后还是发现还是国外的比较全面啊
废话不多说,开代码:
1 html, body, div, span, applet, object, iframe,
2 h1, h2, h3, h4, h5, h6, p, blockquote, pre,
3 a, abbr, acronym, address, big, cite, code,
4 del, dfn, em, font, img, ins, kbd, q, s, samp,
5 small, strike, strong, sub, sup, tt, var,
6 b, u, i, center,
7 dl, dt, dd, ol, ul, li,
8 fieldset, form, label, legend,
9 table, caption, tbody, tfoot, thead, tr, th, td {
10 margin: 0;
11 padding: 0;
12 border: 0;
13 outline: 0;
14 font-size: 100%;
15 vertical-align: baseline;
16 background: transparent;
17 }
18 body {
19 line-height: 1;
20 }
21 ol, ul {
22 list-style: none;
23 }
24 blockquote, q {
25 quotes: none;
26 }
27 blockquote:before, blockquote:after,
28 q:before, q:after {
29 content: '';
30 content: none;
31 }
32
33 /* remember to define focus styles! */
34 :focus {
35 outline: 0;
36 }
37
38 /* remember to highlight inserts somehow! */
39 ins {
40 text-decoration: none;
41 }
42 del {
43 text-decoration: line-through;
44 }
45
46 /* tables still need 'cellspacing="0"' in the markup */
47 table {
48 border-collapse: collapse;
49 border-spacing: 0;
50 }
2 h1, h2, h3, h4, h5, h6, p, blockquote, pre,
3 a, abbr, acronym, address, big, cite, code,
4 del, dfn, em, font, img, ins, kbd, q, s, samp,
5 small, strike, strong, sub, sup, tt, var,
6 b, u, i, center,
7 dl, dt, dd, ol, ul, li,
8 fieldset, form, label, legend,
9 table, caption, tbody, tfoot, thead, tr, th, td {
10 margin: 0;
11 padding: 0;
12 border: 0;
13 outline: 0;
14 font-size: 100%;
15 vertical-align: baseline;
16 background: transparent;
17 }
18 body {
19 line-height: 1;
20 }
21 ol, ul {
22 list-style: none;
23 }
24 blockquote, q {
25 quotes: none;
26 }
27 blockquote:before, blockquote:after,
28 q:before, q:after {
29 content: '';
30 content: none;
31 }
32
33 /* remember to define focus styles! */
34 :focus {
35 outline: 0;
36 }
37
38 /* remember to highlight inserts somehow! */
39 ins {
40 text-decoration: none;
41 }
42 del {
43 text-decoration: line-through;
44 }
45
46 /* tables still need 'cellspacing="0"' in the markup */
47 table {
48 border-collapse: collapse;
49 border-spacing: 0;
50 }