CSS清空樣式

下面的代碼能清除網頁默認樣式
將其直接放在標籤內或者保存爲文件用link導入也可。

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
}
發佈了27 篇原創文章 · 獲贊 49 · 訪問量 2266
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章