reset代碼

/* http://meyerweb.com/eric/tools/css/reset/  
   v2.0 | 20110126  
   License: none (public domain)  
*/ 
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%;  
    font: inherit;   //全部主流瀏覽器都支持 font-family 屬性。可是:任何的版本的 Internet Explorer (包括 IE8)都不支持屬性值 "inherit"。
    vertical-align: baseline;   //vertical-align這個是設置元素的垂直排列的.用來定義行內元素的基線相對於該元素所在行的基線的垂直對齊.它的值baseline(默認值)【對象的內容與基線對齊】|sub【垂直對齊文本的下標】|super【垂直對齊文本的上標】|top【對象的內容與對象頂端對齊】|text-top【對象的文本與對象頂端對齊】|middle【對象的內容與對象中部對齊】|bottom【對象的文本與對象底端對齊】|text-bottom【對象的文本與對象底端對齊】|inherit【任何的版本的 Internet Explorer (包括 IE8)都不支持屬性值 "inherit"。
}  
/* 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: '';  
    content: none;  
}  
table {  
    border-collapse: collapse;  
    border-spacing: 0;  
}
相關文章
相關標籤/搜索