首页 > 代码库 > CSS reset
CSS reset
CSS reset尽量少写,多写了只会增加浏览器在渲染页面的负担
各浏览器的差异多半体现在margin和padding上
html, body, div, span, iframe,
h1, h2, h3, h4, h5, h6, p, a,
del, dfn, em, img,
small, strong,
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, section, summary {
margin: 0;
padding: 0;
border: 0;
font: inherit;
font-size: 100%;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
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: ‘‘;
display: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
CSS reset