app教程网 学习教程 css浏览器重置代码是什么(重置html)

css浏览器重置代码是什么(重置html)

克里斯波特的CSS浏览器重置代码

这段代码可以有效的帮助你解决跨浏览器的问题。虽然不支持IE6,但是你可以放弃这个美国份额不到1%的浏览器。

/* ResetDefaultBrowserStyles -Placefirstinthelistingofexternalstylesheetsforcascading. -Besuretoexplicitlysetmargin/paddingstyles. -Stylesarenotresetthathavetodowithdisplay(block,inline)arenotreset. By:ChrisPoteetvariousinfluences */*{ vertical-align:baseline; font-family:inherit; font-style:inherit; font-size:100%; border:none; padding:0; margin:0; } body{ padding:5px; } h1,h2,h3,h4,h5,h6,p,pre,blockquote,form,ul,ol,dl{ margin:20px0; } li,dd,blockquote{ margin-left:40px; } dt{ font-weight:bold; } table{ border-collapse:collapse; border-spacing:0; }

本文来自网络,不代表本站立场,转载请注明出处:https: