common.less 6.46 KB
body,h1,h2,h3,h4,ul,li,ol,p{
    padding: 0;
    margin: 0;
}
body {
    font: 12px/1.5 sans-serif;
    background-color: #F5F5F5;
    position: relative;
    min-height: 100%;
}
//dev 临时重置方案
*{
    margin: 0;
    padding: 0;
    border: none; 
    -webkit-text-size-adjust: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
li{
    list-style: none;
}
img{
    display: inline-block;
    vertical-align: middle;
    border: 0;
}
input{
    outline: none;
}
a{
    text-decoration: none;
}
.ll{
    float: left;
}
.rr{
    float: right;
}

//资源路径
@imgURI: '../../images/';


.col-f60{
    color: #f60;
}

// btn
.m-btn{
    display: inline-block;
    padding: 0 15px;
    // margin: 10px 0;
    line-height: 45px;
    font-size: 18px;
    color: #666;
    text-align: center;
    border: none;
    background-color: #FFF;
    border-radius: 5px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    cursor: pointer;
    vertical-align: middle;
    border: 1px solid #ddd;
    &.btn-success{
        color: #FFF;
        background-color: #6C2;
        border: none;
        &.reverse{
            background-color: #FFF;
            color: #6C2;
            line-height: 43px;
            border: 1px solid #6C2;
        }
    }

    &.btn-warning{
        color: #FFF;
        background-color: #ff9d2c;
        border: none;
    }

    &.btn-danger{
        color: #FFF;
        background-color: #fa4535;
        border: none;
    }

    &.btn-text{
        background: none;
        border: 1px solid #6c2;
        color: #6c2;
        width: 65px;
        font-size: 12px;
        text-align: center;
        line-height: 23px;
        padding: 0;
        float: right;
        border-radius: 2px;
        margin-top: -2px;
    }
    &.btn-block{
        display: block;
    }
}

.btn-bar{
    margin: 10px;
    overflow: hidden;
    .ll, 
    .rr{
        width: 38%;
    }
    .btn-block{
        margin-bottom: 10px;
    }
}

.m-radio {
    background: url("@{imgURI}icon.png") 0 0  no-repeat;
    width: 20px;
    -webkit-appearance: none;
    appearance: none;
    height: 20px;
    display: inline-block;
    background-size: 150px;
    border: none;
    cursor: pointer;
    margin: 0px;
    position: relative;
}
.m-radio:checked{
    background-position: -25px 0px;
}

.m-checkbox{
    background: url("../../images/icon.png") -75px -35px no-repeat;
    width: 20px;
    -webkit-appearance: none;
    appearance: none;
    height: 21px;
    display: inline-block;
    vertical-align: middle;
    background-size: 150px;
    border: none;
    cursor: pointer;
    margin: 0px;
    position: relative;
}
.m-checkbox:checked{
    background-position: -105px -35px ;
}

.m-input {
    line-height: normal;
    padding: 10px 8px;
    background: none;
    font-size: 14px;
    color: #000;
    text-align: left;
    outline: none;
    border-radius: 3px;
    box-shadow: none;
    border: 0;
    &.m-password{
       background: #f5f5f5; 
    }
}




// header
.m-header{
	height: 44px;
	text-align: center;
    border-bottom: 1px #ddd solid;
    background-color:#fff; 
	h1 {
        display: inline-block;
        vertical-align: middle;
        line-height: 44px;
        font-weight: normal;
        font-size: 18px;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
    }
    .m-icon {
        width: 44px;
        background: url('@{imgURI}icon.png') no-repeat;
        background-size: 150px;
        text-indent: -9999px;
        &.icon-back{
            background-position: 15px -23px;
        }
    }
    .lt-bar, .rt-bar {
        //左右两端区域,用于放置 icon | text
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        min-width: 44px;
        height: 44px;
        cursor: pointer;
    }
    .rt-bar{
        right:0;
    }

}

// m-table-view

.m-table-view{
    background-color: #FFF;
    border-top: 1px solid #ddd;
    margin-top: 10px;

    .cell{
        font-size: 14px;
        padding: 11px 15px;
        text-align: right;
        border-bottom: 1px solid #ddd;
        overflow: hidden;
        position: relative;
        .acc{
            position: absolute;
            top: 50%;
            margin-top: -10px;
            right: 15px;
        }
    }
    .title{
        color: #333;
        float: left;
        font-weight: 400;
        .col-f60{
            color: #f60;
        }
        span{
            display: inline-block;
            vertical-align: middle;
            text-align: left;
            .tips{
                color: #999;
                font-size: 13px;
            }
        }
    }
    .forms{
        .title{
            line-height: 34px;
        }
    }
    .text{
        display: inline-block;
        font-size: 14px;
        color: #999;
    } 
    .m-input-box{
        overflow: hidden;
        .m-input{
            width: 100%;
            padding: 10px 0;
            text-indent: 8px;
        }
    }   
}
.login-view {
    .title {
        width: 65px;
    }
}

.tipsBox{
    margin: 15px;
    color: #78acf3;
}
.tips-icon{
    display: inline-block;
    vertical-align: middle;
    margin-top: -1px;
    width: 13px;
    height: 13px;
    background: url('@{imgURI}icon.png') -35px -38px no-repeat;
    background-size: 150px;
}

.messages{
    margin: 40px 15px;
    text-align: center;
    .success{
        font-size: 16px;
        color: #8ad218;
    }
    .error{
        font-size: 16px;
        color: #ff4412;
    }
    p{
        font-size: 14px;
        color: #666;
        margin-top: 10px;
    }
}
.msg-icon{
    display: inline-block;
    vertical-align: middle;
    margin-top: -2px;
    width: 26px;
    height: 26px;
    background: url('@{imgURI}icon.png') -72px 0px no-repeat;
    background-size: 150px;
    &.error-icon{
        background-position: -107px 0;
    }
}


.tipsWrap{
    margin: 10px 15px;
    color: #999;
    label{
        font-size: 14px;
        padding: 5px 0;
        display: block;
    }
}


.m-message {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: none;
    text-align: center;
    z-index: 9999;
    .text {
        margin-top: 45%;
        display: inline-block;
        vertical-align: middle;
        color: #FFF;
        background: rgba(0, 0, 0, 0.7);
        border-radius: 4px;
        font-size: 14px;
        padding: 15px 45px;
    }
}
.m-animate-hide {
    -webkit-transform: translateY(100%);
    -ms-transform: translateY(100%);
    -o-transform: translateY(100%);
    transform: translateY(100%);
}