forked from RubyLouvre/avalon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
metro.less
137 lines (124 loc) · 2.37 KB
/
metro.less
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
@import "./mulicolumn.less";
[ms-controller]{
// visibility:hidden;
display:none;
}
.columns {
width: 2200px;
background: #a9ea00;
.column-width(340px);
@value: 1px solid blue;
// .column-rule(@value);
.column-gap(0px);
margin: 0px;
font-size: 0;
-webkit-text-size-adjust: none;
height: 600px;
}
.noPaddingRight {
padding-right: 0;
}
.before(@width, @top) {
&:before {
content: "";
display: block;
width: @width;
height: 5px;
position: absolute;
top: @top;
background: #01B4D2;
}
}
.hover(@width, @top) {
.appbody {
.before(@width, @top);
}
}
.hover {
&.app_small {
.hover(150px, 15px);
&.placehoder {
.before(150px, 20px);
}
}
&.app_middle {
.hover(320px, 15px);
&.placehoder {
.before(320px, 15px);
}
}
&.app_big {
.hover(320px, 15px);
}
}
app {
display: inline-block;
width: 150px;
height: 150px;
position: relative;
list-style: none;
// padding:0px;
padding: 20px 20px 0px 20px;
font-size: 12px;
.column-gap(0);
}
.fixb() {
background: yellow;
text-align: center;
opacity: .3;
display: block;
}
.placehoder {
&.app_small {
height: 160px;
width: 180px;
box-sizing: border-box;
-moz-box-sizing: border-box;
b {
width: 150px;
height: 150px;
.fixb(); //use relative positioned pseudo element to fix the elements of dynamic insertion position alignment
&:before {
content: "";
display: block;
width: 150px;
height: 10px;
position: relative;
top: 0px;
opacity: .3;
background: yellow;
}
}
}
&.app_middle {
b {
width: 320px;
height: 150px;
.fixb();
}
}
}
.appbody {
background: red;
width: 100%;
height: 100%;
}
.appbody:hover {
outline: 10px solid rgb(215, 166, 227);
}
.apphead {
width: 100%;
height: 30px;
line-height: 30px;
text-align: center;
background: #fff;
cursor:move;
}
.app_middle {
width: 320px;
height: 150px;
}
.app_big {
width: 320px;
height: 320px;
}