我的CSS reset(也叫CSS复位或默认CSS)
发布时间:2010年3月29日 文章分类:css技巧篇 文章作者:Hitomi 浏览次数:次
- 本文出现技术词汇:
- CSS
CSS reset是标准叫法,用中文理解就是CSS复位,也有叫默认CSS的,因为计算机的中文术语的多样性导致描述不准确,所以最好记住英文的CSS reset,然后理解他的作用即可,这个CSS reset的作用是让所有浏览器对CSS的默认解释保持一致并且恢复像span标签那样没有任何样式,这就叫CSS reset,我写下我的CSS reset大家可以拿去直接用,也可以参考学习。
CSS代码
- /* css reset */
- body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td{padding:0;margin:0;}
- fieldset,img,abbr,acronym{border:0;}
- table{border-collapse:collapse;border-spacing:0;}
- ol,ul{list-style:none;}
- address,caption,cite,code,dfn,em,strong,th,var{font-weight:normal;font-style:normal;}
- caption,th {text-align:left;}
- h1,h2,h3,h4,h5,h6{font-weight:normal;font-size:100%;}
- q:before,q:after{content:'';}
- a{text-decoration:none;}
- a:hover{text-decoration:underline;}
转载请注明出处:風山漸(刘超)原创