当前位置: 首页 > 图文教程 > 网页制作 > CSS样式表 > css reset样式初始化

CSS样式表
用CSS实现鼠标单击特效
引入CSS样式的五种方式
用CSS实现文字变图象特效
expression将JS、Css结合起来
alt属性和title属性
CSS使用技巧20则
CSS重新定义项目符号和编号技巧
CSS编辑工具Topstyle轻松打造网页风格
深入探讨CSS中字体元素
CSS经典实用技巧18招
FCKeditor 实战技巧
China.com网站开发规范
小三角的做法与使用
网站首页head区代码规范
动态更改网页HTML元素(对象)内容
css静态滤镜 + A:Hover
解读absolute与relative
怎样管理好样式
2006.12.06更新 TopStyle剪辑库
又一个典型css实例

CSS样式表 中的 css reset样式初始化


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2010-01-03   浏览: 76 ::
收藏到网摘: n/a

写过css的都知道每个网页引进的css都首先要初始化,而出名的css reset有YUI css reset(QQ、淘宝等都出现他的影子),业内用的最多的还有Erik Meyer’s CSS Reset

整理一下可以得到:

/* reset */
html{color:#000;background:#fff;}
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,input,button,textarea,p,blockquote,th,td{margin:0;padding:0;}
body{font:12px/1 Tahoma,Helvetica,Arial,"\5b8b\4f53",sans-serif;}
img{border:none;}
em,strong{font-style:normal;font-weight:normal;}
li{list-style:none;}
table {border-collapse:collapse;border-spacing:0;}
h1{font-size:18px;}
h2{font-size:16px;}
h3{font-size:14px;}
h4, h5, h6{font-size:100%;}
q:before,q:after{content:'';}/* 消除q前后的内容 */
button,input,select,textarea{font-size:100%;}/* 使得表单元素在 ie 下能继承字体大小 */
input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;}
address,cite,dfn,em,var{font-style:normal;} /* 将斜体扶正 */
/* link */
a{color:#36c;text-decoration:none;}
a:hover{color:#f60;text-decoration:underline;}