-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlibs.less
More file actions
174 lines (169 loc) · 6.79 KB
/
Copy pathlibs.less
File metadata and controls
174 lines (169 loc) · 6.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
/*General style library 通用样式库*/
.dn{display:none;}.db{display:block;}.dib{display:inline-block;}.di{display:inline;}.dbx(){display: -webkit-box; display: -moz-box; display: box;}
.h14{height:14px;}.h16{height:16px;}.h18{height:18px;}.h20{height:20px;}.h22{height:22px;}.h24{height:24px;}
.lh14{line-height:14px;}.lh16{line-height:16px;}.lh18{line-height:18px;}.lh20{line-height:20px;}.lh22{line-height:22px;}.lh24{line-height:24px;}
.m0{margin:0;}.ml1{margin-left:1px;}.ml2{margin-left:2px;}.ml5{margin-left:5px;}.ml10{margin-left:10px;}.ml20{margin-left:20px;}.mr1{margin-right:1px;}.mr2{margin-right:2px;}.mr5{margin-right:5px;}.mr10{margin-right:10px;}.mr20{margin-right:20px;}.mt1{margin-top:1px;}.mt2{margin-top:2px;}.mt5{margin-top:5px;}.mt10{margin-top:10px;}.mt20{margin-top:20px;}.mb1{margin-bottom:1px;}.mb2{margin-bottom:2px;}.mb5{margin-bottom:5px;}.mb10{margin-bottom:10px;}.mb20{margin-bottom:20px;}.ml-1{margin-left:-1px;}.mt-1{margin-top:-1px;}
.p1{padding:1px;}.pl1{padding-left:1px;}.pt1{padding-top:1px;}.pr1{padding-right:1px;}.pb1{padding-bottom:1px;}.p2{padding:2px;}.pl2{padding-left:2px;}.pt2{padding-top:2px;}.pr2{padding-right:2px;}.pb2{padding-bottom:2px;}.pl5{padding-left:5px;}.p5{padding:5px;}.pt5{padding-top:5px;}.pr5{padding-right:5px;}.pb5{padding-bottom:5px;}.p10{padding:10px;}.pl10{padding-left:10px;}.pt10{padding-top:10px;}.pr10{padding-right:10px;}.pb10{padding-bottom:10px;}.p20{padding:20px;}.pl20{padding-left:20px;}.pt20{padding-top:20px;}.pr20{padding-right:20px;}.pb20{padding-bottom:20px;}
.g0{color:#000;}.g3{color:#333;}.g6{color:#666;}.g9{color:#999;}.wh{color:white;}
.cur{cursor: pointer;}
.f0{font-size:0;}.f10{font-size:10px;}.f12{font-size:12px;}.f13{font-size:13px;}.f14{font-size:14px;}.f16{font-size:16px;}.f20{font-size:20px;}.f24{font-size:24px;}
.fa{font-family:Arial;}.ft{font-family:Tahoma;}.fv{font-family:Verdana;}.fs{font-family:'宋体';}.fw{font-family:'黑体';}
.n{font-weight:normal; font-style:normal;}.b{font-weight:bold;}.i{font-style:italic;}
.tc{text-align:center;}.tr{text-align:right;}.tl{text-align:left;}.tj(){text-align:justify;}
.vm{vertical-align:middle;}.vb{vertical-align:bottom;}.vt{vertical-align:top;}.vn{vertical-align:-2px;}
.l{float:left;}.r{float:right;}
.cl{clear:both;}
.rel{position:relative;}.abs{position:absolute;}.fixed{position: fixed;}
.poi{cursor:pointer;}.def{cursor:default;}
.ovh{overflow:hidden;}
.vh{visibility:hidden;}.vv{visibility:visible;}
.z{*zoom:1;}
//块状元素水平居中
.auto{margin-left:auto; margin-right:auto;}
//基于display:table-cell的自适应布局
.cell{display:table-cell; *display:inline-block; width:2000px; *width:auto;}
//双栏自适应cell部分连续英文字符换行
.cell_bk{display:table; width:100%; table-layout:fixed; word-wrap:break-word;}
//单行文字溢出虚点显示
.ell{text-overflow:ellipsis; white-space:nowrap; overflow:hidden;}
//清除浮动
.clear{
*zoom : 1;
&:after{
content: '\0020';
display: block;
height: 0;
clear: both;
}
}
// 文字函数
.wrap(){
text-wrap: wrap;
white-space: pre-wrap;
white-space: -moz-pre-wrap;
word-wrap: break-word;
}
// 比例函数
.sc (@v:100%){
width: @v;
height: @v;
}
// 圆角函数
.border-radius (@tl:5px,@tr:5px,@br:5px,@bl:5px) {
-webkit-border-radius: @arguments;
-moz-border-radius: @arguments;
border-radius: @arguments;
zoom:1;
}
// 四角的半径定制
.border-radius-custom (@topleft: 5px, @topright: 5px, @bottomleft: 5px, @bottomright: 5px) {
-webkit-border-radius: @topleft @topright @bottomright @bottomleft;
-moz-border-radius: @topleft @topright @bottomright @bottomleft;
border-radius: @topleft @topright @bottomright @bottomleft;
}
// 线性渐变函数
.gradient (@origin: left, @start: #ffffff, @stop: #000000) {
background-color: @start;
background: -webkit-linear-gradient(@origin, @start, @stop);
background: -moz-linear-gradient(@origin, @start, @stop);
background: -o-linear-gradient(@origin, @start, @stop);
background: -ms-linear-gradient(@origin, @start, @stop);
background: linear-gradient(@origin, @start, @stop);
}
// 盒投影
.box-shadow (@x: 0px, @y: 3px, @blur: 5px, @spread:-3px, @color:#000) {
-webkit-box-shadow: @arguments;
-moz-box-shadow: @arguments;
box-shadow: @arguments;
}
// 文字投影
.text-shadow(@x: 0px, @y: 3px, @blur: 5px, @color:#000){
-webkit-text-shadow: @arguments;
-moz-text-shadow: @arguments;
text-shadow: @arguments;
}
// 镜像效果
.reflect (@length: 50%, @opacity: 0.2){
-webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(@length, transparent), to(rgba(255,255,255,@opacity)));
}
// 屏蔽效果
.mask (@image-url,@color){
-webkit-mask-box-image:url(@image-url);
background-color: @color
}
// 元素过渡效果
.transition (@prop: all, @time: 1s, @ease: linear) {
-webkit-transition: @prop @time @ease;
-moz-transition: @prop @time @ease;
-o-transition: @prop @time @ease;
-ms-transition: @prop @time @ease;
transition: @prop @time @ease;
}
// 转换/旋转
.transform (@rotate: 90deg, @scale: 1, @skew: 1deg, @translate: 10px) {
-webkit-transform: rotate(@rotate) scale(@scale) skew(@skew) translate(@translate);
-moz-transform: rotate(@rotate) scale(@scale) skew(@skew) translate(@translate);
-o-transform: rotate(@rotate) scale(@scale) skew(@skew) translate(@translate);
-ms-transform: rotate(@rotate) scale(@scale) skew(@skew) translate(@translate);
transform: rotate(@rotate) scale(@scale) skew(@skew) translate(@translate);
}
// 图片居中函数,接受图片尺寸
.pic (@size:30px){
overflow: hidden;
width:@size;
height:@size;
a{
//A-Grade Browsers
display: table-cell;
vertical-align: middle;
text-align: center;
// IE6,7 hack
*display: block;
*font-family: Arial;
*line-height: 0;
width:@size;
height:@size;
*font-size:@size*0.873;
img{
vertical-align: middle;
}
}
}
// 图片
.image(@image-url,@repeat,@bgs:100%){
background: url(@image-url) @repeat;
background-size: @bgs;
}
.image(){
background: url(@image-url) no-repeat;
background-size: @bgs;
}
//图片列表
.pic{
img{
.sc();
}
}
// 纵向 : vertical 横向 : horizontal;
.bo (@v){
.dbx;
-webkit-box-orient:@v;
-moz-box-orient:@v;
-ms-box-orient:@v;
box-orient:@v;
}
// box-flex 分配
.bf (@v:1){
-webkit-box-flex:@v;
-moz-box-flex:@v;
-ms-box-flex:@v;
box-flex:@v;
}
// 填充
.pd (@y:0,@x:0){
padding: @y @x;
}
// 间距
.mg (@y:0,@x:0){
margin: @y @x;
}