码迷,mamicode.com
首页 > Web开发 > 详细

CSS reset

时间:2014-09-19 17:10:55      阅读:198      评论:0      收藏:0      [点我收藏+]

标签:style   io   ar   strong   for   div   art   sp   cti   

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

标签:style   io   ar   strong   for   div   art   sp   cti   

原文地址:http://www.cnblogs.com/zodiacblog/p/3981631.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!