您的位置:首页 > Web前端 > CSS

【原创】自用css reset

2016-07-21 15:42 776 查看

自己工作中常用的reset,和一些设置,实际用时会根据网站页面进行增删。

/* Common style */
html{ overflow-y:scroll; overflow-x:auto;}
body,h1,h2,h3,h4,h5,h6,p,form{ margin:0;}
body{ font:14px 'Microsoft YaHei',tahoma,Srial,helvetica,sans-serif;}
h1,h2,h3,h4,h5,h6{ font-size:100%;}
ul{ margin:0; padding:0; list-style:none;}
a img,input,button,textarea{ border:none;}
table{ border-collapse:collapse; border-spacing:0; width:100%;}

/* Link Style */
a:visited{ outline:none;}
a:link{ color:#333; text-decoration:none;}
a:visited{ color:#333; text-decoration:none;}
a:hover{ color:#f40; text-decoration:underline;}
a:active{ color:#f40; text-decoration:underline;}

/* Font Style */
.size_16{ font-size:16px;}
.red,body a.red{ color:#f00;}/*红色文字和链接*/
body .color3{ color:#333;}
body .color6{ color:#666;}
body .color9{ color:#999;}
.normal{ font-weight:normal;}
.bold{ font-weight:bolder;}

/* Space Style */
.mt10{ margin-top:10px;}
.pt10{ padding-top:10px;}

/* Form Style */
.checkbox{ vertical-align:middle; margin:-2px 5px 1px 0;}
.btn_red{ border-radius:5px; color:#fff; background:#ef4949; cursor:pointer;}/*红色按钮*/
a.btn_red{ display:inline-block; color:#fff; text-align:center; text-decoration:none;}
.btn_red:hover{ background:#d72d2d;}
.text1{ width:280px; height:38px; line-height:38px; padding:0 10px; border:1px solid #e2e2e2; border-radius:5px; background:#eee;}
textarea{ vertical-align:middle;}

/* Body Style */
.con{ width:1200px; margin:0 auto;}
.fl{ float:left;}
.fr{ float:right;}
.hide{ overflow:hidden;}
.t_hide{ overflow:hidden; white-space:nowrap; text-overflow:ellipsis;}
.block{ display:inline-block;}
.t_cen{ text-align:center;}
.p_re{ position:relative;}
.p_ab{ position:absolute;}

/* header */
.top{ height:40px; line-height:40px; font-size:12px; border-bottom:1px solid #ddd; background:#f3f3f3;}
.logo{ width:342px; height:50px; display:inline-block; margin:25px 0; background:url(../images/logo.png) no-repeat;}
.logo h1{ text-indent:-9999px;}
.nav{ width:650px; overflow:hidden;}
.nav li{ width:130px; float:left;}

/* content */

/* footer */

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: