码迷,mamicode.com
首页 > Web开发 > 详细

代码:CSS——reset.css

时间:2016-01-08 13:08:06      阅读:211      评论:0      收藏:0      [点我收藏+]

标签:

 

 

A链接标签:

/* 链接样式、文字颜色 */
a{color:#666;text-decoration:none;}
a:link{color:#666;}
a:visited{color:#666;}
a:hover, a:active{color:#ff7200;outline:0;}
.gray3, .gray3 > a ,a.gray3{color:#333;}
.gray6, .gray6 > a ,a.gray6{color:#666;}
.gray9, .gray9 > a ,a.gray9{color:#999;}
.grayb, .grayb > a ,a.grayb{color:#bbb;}
.grayc, .grayc > a ,a.grayc{color:#ccc;}
.grayd, .grayd > a ,a.grayd{color:#ddd;}
.grayf, .grayf > a ,a.grayf{color:#f2f2f2;}
.white, .white > a ,a.white{color:#fff;}
.orange, .orange> a ,a.orange{color:#ff7200;}

 

参考:淘宝的首页的一部分css

blockquote,body,button,dd,dl,dt,fieldset,form,h1,h2,h3,h4,h5,h6,hr,input,legend,li,ol,p,pre,td,textarea,th,ul{margin:0;padding:0;}
body,button,input,select,textarea {font: 12px/1.4 tahoma,arial,‘Hiragino Sans GB‘,\5b8b\4f53,sans-serif}
h1,h2,h3,h4,h5,h6 {font-size: 100%}
address,cite,dfn,em,var {font-style: normal}
code,kbd,pre,samp {font-family: courier new,courier,monospace}
small {font-size: 12px}
ol,ul {list-style: none}
a {text-decoration: none}
a:hover {text-decoration: underline}
sup {vertical-align: text-top}
sub {vertical-align: text-bottom}
legend {color: #000}
fieldset,img {border: 0}
button,input,select,textarea {font-size: 100%}
table {border-collapse: collapse;border-spacing: 0}
.main{margin-left: auto;margin-right: auto;}

 

reset:

@charset "utf-8";

/********** 1.reset **********/
/* 清除标签自带边距 */
body,p,h1,h2,h3,h4,h5,h6,ul,ol,li,dl,dt,dd,input,textarea,th,td,select,hr,legend,fieldset {margin:0;padding:0;}
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary {display: block;}
ul,li {list-style: none;}
input,button,select,textarea {font-family: inherit;font-size: inherit;line-height: inherit;outline: none;background: none;}
textarea {border:none 0;}
iframe[name=‘google_conversion_frame‘]{display:none;}/*google 统计样式*/
img,input,textarea {vertical-align: middle;}/* 保持垂直居中 */
img,hr {border: none 0;}/* 去除img边框 */
i,em {font-style: normal;}/* 清除字体倾斜 */

/* 链接样式、文字颜色 */
a{color:#666;text-decoration:none;}
a:link{color:#666;}
a:visited{color:#666;}
a:hover, a:active{color:#ff7200;outline:0;}
.gray3, .gray3 > a ,a.gray3{color:#333;}
.gray6, .gray6 > a ,a.gray6{color:#666;}
.gray9, .gray9 > a ,a.gray9{color:#999;}
.grayb, .grayb > a ,a.grayb{color:#bbb;}
.grayc, .grayc > a ,a.grayc{color:#ccc;}
.grayd, .grayd > a ,a.grayd{color:#ddd;}
.grayf, .grayf > a ,a.grayf{color:#f2f2f2;}
.white, .white > a ,a.white{color:#fff;}
.orange, .orange> a ,a.orange{color:#ff7200;}

/* 设置HTML5标签 块元素*/
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary{display:block;}


/********** 2.公共元素、控件定义 **********/
/*文字大小*/
.f10{font-size:10px;}
.f12{font-size:12px;}
.f14{font-size:14px;}
.f16{font-size:16px;}
.f18{font-size:18px;}
.f20{font-size:20px;}
.f22{font-size:22px;}
.f24{font-size:24px;}
.f26{font-size:26px;}
.f28{font-size:28px;}
.f30{font-size:30px;}
.f36{font-size:36px;}

h1, .h1{font-size:30px;}
h2, .h2{font-size:28px;}
h3, .h3{font-size:22px;}
h4, .h4{font-size:20px;}
h5, .h5{font-size:18px;}
h6, .h6{font-size:16px;}


/*描边 定义*/
.border1{border:1px solid #ececec;}
.border1-top{border-top:1px solid #ececec;}
.border1-bottom{border-bottom:1px solid #ececec;}
.border1-left{border-left:1px solid #ececec;}
.border1-right{border-right:1px solid #ececec;}


/*文本框 定义*/
.input{outline:0;color:#999;display: inline-block;padding: 0.8em;font-size: 14px;font-weight: normal;line-height: 1;text-align:left;white-space: nowrap;
    vertical-align: middle;background-image: none;border:1px solid #ececec;border-radius: 3px;
    -webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
    -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
    transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
}/*常态输入框*/
.select{border:1px solid #ececec;padding:4px 0;}


/********** css零件 **********/
.clearfix:after {content:‘‘;display: block;height: 0;overflow: hidden;clear: both;}
.l{float:left;}
.r{float:right;}
.i{font-style:italic;}
.fN{font-weight: normal;}
.fB{font-weight: bold;}
.rmb{font-family:Arial;}
.dib{display:inline-block;}
.etc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}
.wrap{word-wrap:break-word;}/*强制换行*/
.nowrap{white-space:nowrap;}/*禁止换行*/
.tc{text-align:center;}

.mt5{margin-top:5px;}.mr5{margin-right:5px;}.mb5{margin-bottom:5px;}.ml5{margin-left:5px;}
.mt10{margin-top:10px;}.mr10{margin-right:10px;}.mb10{margin-bottom:10px;}.ml10{margin-left:10px;}
.mt15{margin-top:15px;}.mr15{margin-right:15px;}.mb15{margin-bottom:15px;}.ml15{margin-left:15px;}
.mt20{margin-top:20px;}.mr20{margin-right:20px;}.mb20{margin-bottom:20px;}.ml20{margin-left:20px;}

.lh100{line-height:1;}.lh110{line-height:1.1;}.lh120{line-height:1.2;}.lh130{line-height:1.3;}.lh140{line-height:1.4;}
.lh150{line-height:1.5;}.lh160{line-height:1.6;}.lh170{line-height:1.7;}.lh180{line-height:1.8;}.lh190{line-height:1.9;}.lh200{line-height:2;}/*行高*/


/********** 页面布局 **********/
.main {width:1190px;margin-left:auto;margin-right:auto;}
.layout-main{background:#ecebeb;width:1190px;margin-left:auto;margin-right:auto;font-family: ‘Microsoft YaHei‘;overflow:auto;}
.layout-left{float:left;background:#fff;width:920px;padding-right:20px;}
.layout-right{float:right;width:250px;}

 

 

 

..

 

代码:CSS——reset.css

标签:

原文地址:http://www.cnblogs.com/qq21270/p/5112681.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!