船长 发表于 2009-02-11 14:31 | 分类:css | 阅读数:920 次
CSS Reset是指重设浏览器的样式。不同的浏览器默认的样式可能不近相同,所有开发时的第一件事可能就是如果把他们统一。
下面的代码是YaHoo的方法,我们可以参考学习。
总结与编写出,适合自己工作与学习的CSS Reset代码。
大家可以参考一下,或者写一个更适合自己的重置代码。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 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; } table { border-collapse: collapse; border-spacing: 0; } fieldset,img { border: 0; } address,caption,cite,code,dfn,em,strong,th,var { font-weight: normal; font-style: normal; } ol,ul { list-style: none; } caption,th { text-align: left; } h1,h2,h3,h4,h5,h6 { font-weight: normal; font-size: 100%; } q:before,q:after { content:”; } abbr,acronym { border: 0; } |