什么是reset.css桶至?可以干什么事?
在HTML標(biāo)簽在瀏覽器里有默認(rèn)的樣式啦桌,例如 p 標(biāo)簽有上下邊距溯壶,strong標(biāo)簽有字體加粗樣式,em標(biāo)簽有字體傾斜樣式甫男。但是不同瀏覽器的默認(rèn)樣式之間也會(huì)有差別且改,例如ul默認(rèn)帶有縮進(jìn)的樣式,在IE下板驳,它的縮進(jìn)是通過(guò)margin實(shí)現(xiàn)的又跛,而Firefox下,它的縮進(jìn)是由padding實(shí)現(xiàn)的笋庄。在切換頁(yè)面的時(shí)候效扫,瀏覽器的默認(rèn)樣式往往會(huì)給我們帶來(lái)麻煩倔监,影響開發(fā)效率。所以解決的方法就是一開始就將瀏覽器的默認(rèn)樣式全部去掉菌仁,更準(zhǔn)確說(shuō)就是通過(guò)重新定義標(biāo)簽樣式浩习。“覆蓋”瀏覽器的CSS默認(rèn)屬性济丘。最最簡(jiǎn)單的說(shuō)法就是把瀏覽器提供的默認(rèn)樣式覆蓋掉谱秽!這就是CSS reset!D∶浴疟赊!就是定義一個(gè)css樣式把所有的默認(rèn)樣式全部清除掉。
@charset "UTF-8";body{font-family:"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微軟雅黑",Arial,sans-serif;font-weight:400;font-size:14px;color:#000;-webkit-font-smoothing:antialiased}a{color:#409EFF;text-decoration:none}a:focus,a:hover{color:#66b1ff}a:active{color:#3a8ee6}h1,h2,h3,h4,h5,h6{color:#606266;font-weight:inherit}h1:first-child,h2:first-child,h3:first-child,h4:first-child,h5:first-child,h6:first-child,p:first-child{margin-top:0}h1:last-child,h2:last-child,h3:last-child,h4:last-child,h5:last-child,h6:last-child,p:last-child{margin-bottom:0}h1{font-size:20px}h2{font-size:18px}h3{font-size:16px}h4,h5,h6,p{font-size:inherit}p{line-height:1.8}sub,sup{font-size:13px}small{font-size:12px}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}