通用CSS样式

  |   0 评论   |   3,592 浏览
    /*css reset*/
    body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td,span{padding:0;margin:0;}
    fieldset,img,html,body,iframe{border:0;}
    /** 重置表格元素 **/
    table{border-collapse:collapse;border-spacing:0;}
    ol,ul{list-style:none;}
    address,caption,cite,code,dfn,em,strong,th,var{font-weight:normal;font-style:normal;}
    caption,th{text-align:left;}
    em,i,small,caption,th{font-weight:normal;font-style:normal;font-size:100%;}
    h1,h2,h3,h4,h5,h6,em{font-weight:normal;}
    q:before,q:after{content:'';}
    img{border:0;vertical-align:middle;max-width:100%}
    a,button{outline:none;border:0;}
    input,select{border:1px solid #ccc;font-family:inherit;}
    button::-moz-focus-inner{border:0;padding:0;margin:0;}
    textarea,input,button,select{outline:0;font-size:inherit;line-height:inherit;color:inherit;font-family:inherit;outline:none;}
    textarea{overflow:auto;resize:none;font-family:inherit;}
    
    /*文字排版*/
    .fz12{font-size:12px!important;}
    .fz13{font-size:13px!important;}
    .fz14{font-size:14px!important;}
    .fz16{font-size:16px!important;}
    .fz18{font-size:18px!important;}
    .fz20{font-size:20px!important;}
    .fz24{font-size:24px!important;}
    .fz32{font-size:32px!important;}
    .fz48{font-size:48px!important;}
    .fz64{font-size:64px!important;}
    .fz96{font-size:96px!important;}
    .fz128{font-size:128px!important;}
    .t2{text-indent: 2em!important;}
    .c1{color:red;}
    .c2{color:blue;}
    .c3{color:yellow;}
    .lh150{line-height: 150%;}
    .lh180{line-height: 180%;}
    .lh200{line-height: 200%;}
    .unl{text-decoration: underline;}
    .no_unl{text-decoration: none;}
    
    
    
    /*边距*/
    .mr10{margin: 10px;}
    .mr15{margin: 15px;}
    .mr20{margin: 20px;}
    .mr30{margin: 30px;}
    .mt5{margin-top: 5px;}
    .mt10{margin-top: 10px;}
    .mt15{margin-top: 15px;}
    .mt20{margin-top: 20px;}
    .mt30{margin-top: 30px;}
    .mb5{margin-bottom: 5px;}
    .mb10{margin-bottom: 10px;}
    .mb15{margin-bottom: 15px;}
    .mb20{margin-bottom: 20px;}
    .mb30{margin-bottom: 30px;}
    .ml5{margin-left: 5px;}
    .ml10{margin-left: 10px;}
    .ml15{margin-left: 15px;}
    .ml20{margin-left: 20px;}
    .ml30{margin-left: 30px;}
    .mr5{margin-right: 5px;}
    .mr10{margin-right: 10px;}
    .mr15{margin-right: 15px;}
    .mr20{margin-right: 20px;}
    .mr30{margin-right: 30px;}
    
    .pd10{padding: 10px;}
    .pd15{padding: 15px;}
    .pd20{padding: 20px;}
    .pr30{padding: 30px;}
    .pt5{padding-top: 5px;}
    .pt10{padding-top: 10px;}
    .pt15{padding-top: 15px;}
    .pt20{padding-top: 20px;}
    .pt30{padding-top: 30px;}
    .pb5{padding-bottom: 5px;}
    .pb10{padding-bottom: 10px;}
    .pb15{padding-bottom: 15px;}
    .pb20{padding-bottom: 20px;}
    .pb30{padding-bottom: 30px;}
    .pl5{padding-left: 5px;}
    .pl10{padding-left: 10px;}
    .pl15{padding-left: 15px;}
    .pl20{padding-left: 20px;}
    .pl30{padding-left: 30px;}
    .pr5{padding-right: 5px;}
    .pr10{padding-right: 10px;}
    .pr15{padding-right: 15px;}
    .pr20{padding-right: 20px;}
    .pr30{padding-right: 30px;}
    
    /*宽度和高度 div p form控制input的宽度和高度*/
    .w10{width:10px;}
    .w20{width:20px;}
    .w30{width:30px;}
    .w40{width:40px;}
    .w50{width:50px;}
    .w60{width:60px;}
    .w70{width:70px;}
    .w80{width:80px;}
    .w90{width:90px;}
    .w100{width:100px;}
    .w200{width:200px;}
    .w250{width:250px;}
    .w400{width:400px;}
    .w500{width:500px;}
    .w700{width:700px;}
    .w{width:100%;}
    .h{height:100%;}
    .h50{height:50px;}
    .h80{height:80px;}
    .h200{height:200px;}
    
    /*定位浮动*/
    .tl{text-align:left;}
    .tc{text-align: center;}
    .tr{text-align: right;}
    .fl{float:left;}
    .fr{float:right;}
    .cb{clear:both;}
    .cl{clear:left;}
    .cr{clear:right;}
    .vm{vertical-align: middle;}
    .pr{position: relative;}
    .pa{position:absolute;}
    .px{position:fixed;}
    
    
    /*隐藏和显示类*/
    .hide{display: none;}
    .show{display: block;}
    .hidden{visibility: hidden;}
    
    /*清楚浮动*/
    .clearfix{*zoom:1;}/*兼容ie67*/
    .clearfix:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0;}
    /*ie9+*/
    
    /*鼠标手势*/
    .cur{cursor: pointer;}
    .curm{cursor: move;}
    .curd{cursor: default;}


    >