清除所有默认样式

本来我是使用 * ,后来被告知这个有bug,所以特意送上完整版的清除样式的一段代码,希望对你们有帮助!

/*---样式清除开始----*/
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    font-size: 100%;
    font-weight: inherit;
    font-style: normal;
    vertical-align: baseline;
    background: transparent;
    border: 0;
    outline: 0;
}

/* HTML5 RESETS FOR OLDER BROWSERS */
article, aside, figure, figure img, hgroup, footer, header, nav, section {
    display: block;
}

ol, ul {
    list-style: none;
}

a {
    text-decoration: none;
}

/*---样式清除结束------*/

你可能感兴趣的:(清除所有默认样式)