reset.css的一般寫法

對於img撐父元素的高度時,會有幾像素的多餘高度可以通過設置vertical-align:top;其中vertical-align用於設置幾個元素的垂直對齊方式,只有幾個元素同時設置時纔會生效。

html {

    color: #000;

    background: #FFF;

}



body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td {

    margin: 0;

    padding: 0;

}



table {

    border-collapse: collapse;

    border-spacing: 0;

}



fieldset, img {

    border: 0;

}



address, caption, cite, code, dfn, em, strong, th, var {

    font-style: normal;

    font-weight: normal;

}



ol, ul {

    list-style: none;

}



caption, th {

    text-align: left;

}



h1, h2, h3, h4, h5, h6 {

    font-size: 100%;

    font-weight: normal;

}



q:before, q:after {

    content: '';

}



abbr, acronym {

    border: 0;

    font-variant: normal;

}



sup {

    vertical-align: text-top;

}



sub {

    vertical-align: text-bottom;

}



input, textarea, select {

    font-family: inherit;

    font-size: inherit;

    font-weight: inherit;

    *font-size: 100%;

}



legend {

    color: #000;

}



#yui3-css-stamp.cssreset {

    display: none;

}

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章