六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 185|回复: 0

css reset css重置分享

[复制链接]

升级  90.67%

54

主题

54

主题

54

主题

秀才

Rank: 2

积分
186
 楼主| 发表于 2013-2-7 23:53:21 | 显示全部楼层 |阅读模式
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
caption{margin:0; padding:0; border:0; outline:0; font-weight:inherit; font-style:inherit; font-family:inherit;  vertical-align:baseline}
ol, ul{list-style:none}
table{border-collapse:separate; border-spacing:0}
caption, th, td{text-align:left; font-weight:normal}
blockquote:before, blockquote:after,
q:before, q:after{content:""}
blockquote, q{quotes:""""}
注意以上css reset没有将table的相关标签列出进来,原因是会和一些在线编辑器看到的效果冲突。
以下为css全局属性定义,主要将一些常用的css属性写出来:
/*--全局标签--*/
body { color: #2b2b2b; font-family: Arial, Helvetica, sans-serif}
img { border: none}
a { color: #2b2b2b; text-decoration: none}
a:hover { color: #c00; text-decoration: underline}
/*--全局类--*/
/*--布局类--*/
.clear{ clear: both; margin: 0; padding: 0; height: 0; font-size: 0; line-height: 0; overflow: hidden} /*---用来清除浮动的div---*/
.left { float: left} /*---常用的左浮动---*/
.right { float: right} /*---常用的右浮动---*/
.tleft { text-align: left} /*---常用的居左---*/
.tcenter { text-align: center}/*---常用的居中---*/
.tright { text-align: right} /*---常用的居右---*/
/*--字体类--*/
.font12 { font-size: 12px}
.font14 { font-size: 14px}
.font16 { font-size: 16px}
.font18 { font-size: 18px}
.font20 { font-size: 20px}
.fb { font-weight: bold}
.fu { text-decoration: underline}
.fn { text-decoration: none}
/*--颜色类(常修改增加)--*/
.cred, a.cred:link, a.cred:visited, a.cred:hover { color: #c00}
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表