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

CSS样式表
CSS+DIV 拼图(26个英文字母)
css 模拟表格斜线
hr 样式实现1px直线
css 画的百度LOGO
css 文字上右下环绕广告的写法
CSS 实现未知内容高度的垂直水平居中(改良版)
input 按钮显示差异的解决方法
css 限定GridView宽度并加上滚动条
ie6 position-fixed效果
css 书写技巧 CSS 技巧教程
IE和FireFox JavaScript的函数名的作用域的异同
纯CSS 级联菜单实现代码
CSS 清除网页浮动 经验
id与class的使用原则 网页制作经验
CSS expression判断表达式设置input样式
应用IE6所不支持的CSS的type选择器
CSS 网页内容换行控制
DIV+CSS 网页布局心得
CSS 教程之内容设置的一些语法
用div和ul标签画表格进行布局兼容火狐、ie6、ie7、Opera等浏览器

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2010-01-03   浏览: 82 ::
收藏到网摘: 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;}