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是什么意义?的细致内容,更多请关注ki4网别的相干文章!