// 定义颜色
|
@themeColor: #05192E;
|
@text: #333;
|
@description: #999;
|
@title: #666;
|
@buttonColor: #4DA0FE;
|
@buttonHover: #418DDF;
|
@backgroundColor: #011230;
|
@borderColor: #e5e5e5;
|
@white: transparent;
|
@header: #F0F7FF;
|
@divback:rgba(255,255,255,0.3);
|
//定义字体
|
@normalSize: 14px;
|
@formSize: 12px;
|
@titleSize: 16px;
|
@projectNameSize: 18px;
|
//zIndex
|
@z1: 1;
|
@z2: 2;
|
@z3: 3;
|
@z4: 4;
|
@z5: 5;
|
|
.border(@size: 1px) {
|
border: @size solid @borderColor;
|
}
|
|
//圆角
|
.borderRadius(@radius) {
|
-webkit-border-radius: @radius;
|
-moz-border-radius: @radius;
|
-ms-border-radius: @radius;
|
-o-border-radius: @radius;
|
border-radius: @radius;
|
}
|
|
//阴影效果
|
.shadow (@x:1px,@y:1px,@blurry:1px,@color:#F4F4F4) {
|
-moz-box-shadow: @x @y @blurry @color;
|
-webkit-box-shadow: @x @y @blurry @color;
|
box-shadow: @x @y @blurry @color;
|
}
|
|
//定位全屏
|
.allCover(@top) {
|
position: absolute;
|
top: @top;
|
left: 0;
|
right: 0;
|
bottom: 0;
|
}
|
|
//定位上下左右居中
|
.center() {
|
position: absolute;
|
top: 50%;
|
left: 50%;
|
transform: translateX(-50%) translateY(-50%);
|
}
|
|
//定位上下居中
|
.ct() {
|
position: absolute;
|
top: 50%;
|
transform: translateY(-50%);
|
}
|
|
//定位上下居中
|
.cl() {
|
position: absolute;
|
left: 50%;
|
transform: translateX(-50%);
|
}
|
|
//设置宽高
|
.wh(@width, @height) {
|
width: @width;
|
height: @height;
|
}
|
|
//字体大小、行高、字体
|
.font(@size,@line-height, @family: 'SimSun,Arial Narrow,HELVETICA;') {
|
font: @size/@line-height @family;
|
}
|
|
//字体大小,颜色
|
.sc(@size, @color) {
|
font-size: @size;
|
color: @color;
|
}
|
|
//flex 布局和 子元素 对其方式
|
.fj(@type: space-between) {
|
display: flex;
|
justify-content: @type;
|
}
|
|
//背景渐变
|
|
.bgGradient(@to,@form) {
|
background: @to;
|
background: -moz-linear-gradient(top, @to 0%, @form 100%);
|
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, @to), color-stop(100%, @form));
|
background: -webkit-linear-gradient(top, @to 0%, @form 100%);
|
background: -o-linear-gradient(top, @to 0%, @form 100%);
|
background: -ms-linear-gradient(top, @to 0%, @form 100%);
|
background: linear-gradient(to bottom, @to 0%, @form 100%);
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='@{to}', endColorstr='@{form}', GradientType=0);
|
}
|
|
.default-btn {
|
.borderRadius(5px);
|
.bgGradient(#eeeeee, #dddddd);
|
&:hover {
|
.bgGradient(#dddddd, #eeeeee);
|
}
|
}
|
|
.success-btn {
|
.borderRadius(5px);
|
.bgGradient(@buttonColor, #3F82D1);
|
&:hover {
|
.bgGradient(@buttonColor, @buttonHover);
|
}
|
}
|
|
.ellipsis {
|
overflow: hidden;
|
text-overflow: ellipsis;
|
white-space: nowrap;
|
}
|