首頁  >  文章  >  web前端  >  css reset是什麼意思?

css reset是什麼意思?

藏色散人
藏色散人原創
2019-05-15 13:10:475128瀏覽

css reset是什麼意思?

HTML標籤在瀏覽器中都有預設的樣式,例如p標籤有上下邊距,strong標籤有字體加粗樣式等。不同瀏覽器的預設樣式之間存在差別,例如ul預設帶有縮排樣式,在IE下,它的縮排是由margin實現的,而在Firefox下卻是由padding實現的。

CSS reset是現在很流行的解決方法是一開始就將瀏覽器的預設樣式全部覆蓋掉,開發時瀏覽器的預設樣式可能會給我們帶來多瀏覽器相容性問題,影響開發效率。

部分CSS reset內容如下

html {color:#000;background:#FFF;}t5
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;}
li {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;}
input,textarea,select {*font-size:100%;}
legend {color:#000;}

相關推薦:《CSS教學

以上是css reset是什麼意思?的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn