?不同的瀏覽器默認樣式不一樣,所以容易出現兼容性問題,每次寫網頁時都應該都網頁的css或HTML標簽進行初始化
這樣可以節約代碼,節約網頁下載時間,是網頁內容更加簡潔,
大致需要初始化的地方有
H1-H4標簽,table標簽,文字大小,文字沒有鏈接,超鏈接樣式,DIV,居中,ol,ul,li,img等等的樣式,
一些示例:
body,div,dl,dt,dd,ul,ol,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{margin:0;padding:0;}body{background:#fff;color:#555;font-size:14px;font-family:Verdana,Arial,Helvetica,sans-serif;}td,th,caption{font-size:14px;}h1,h2,h3,h4,h5,h6{font-weight:normal;font-size:100%;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}a{color:#555;text-decoration:none;}a:hover{text-decoration:underline;}img{border:none;}ol,ul,li{list-style:none;}input,textarea,select,button{font:14px Verdana,Helvetica,Arial,sans-serif;}table{border-collapse:collapse;}html{overflow-y:scroll;}.clearfix:fater{content:".";dispaly:block;height:0;clear:both;visiblity:hidden;}.clearfix{*zoom:1;}
?