网页常用重置样式代码

html, body { height: 100%; }
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, 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,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    vertical-align: baseline;
}

article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
    display: block;
}
body {
    line-height: 1;
}
ol, ul {
    list-style: none;
}
blockquote, q {
    quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}


body { background:#eee; margin:0; }

a:link, a:visited, a:active { color: #3c9632; text-decoration: none; outline:none; }
a:hover { text-decoration: none; color: #34742d; }


body { font-family:Arial, Helvetica, sans-serif; font-size: 14px; color: #555; }

h1, h2, h3, h4, p { margin:0 0 15px 0; padding:0; }
h1 { font-size:36px; font-weight:normal; font-family:arial, sans-serif; letter-spacing:-1px; color:#333; }
h2 { font-size:28px; font-weight:normal; font-family:arial, sans-serif; letter-spacing:-1px; color:#333; padding:15px 0 0 0; }
h3 { font-size:22px; font-weight:normal; font-family:arial, sans-serif; letter-spacing:-1px; color:#333; padding:15px 0 0 0; }
h4 { font-size:16px; font-weight:normal; font-family:arial, sans-serif; color:#333; padding:15px 0 0 0; }
p { line-height:1.5em }

.clr {clear:both; font-size:1px; height:1px; }

/* float clearing for IE6 */
* html .clearfix{ height: 1%; overflow: visible;}
/* float clearing for IE7 */
*+html .clearfix{ min-height: 1%;}
/* float clearing for everyone else */
.clearfix:after{ clear: both; content: "."; display: block; height: 0; visibility: hidden; font-size: 0;}

#main {  width:970px; margin:0 auto;  }
    #content { padding:30px; background:#fff; min-height:500px; }

footer { padding:15px 0; font-size:11px; text-align:center; color:#777 }












你可能感兴趣的:(CSS)