forked from msmbps/msmbps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
304 lines (280 loc) · 7.73 KB
/
style.css
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
/*
*
*
* CSS code of "PING ms"
* The full project is at https://github.com/pingms/pingms
*
* @pingms founded the project.
* @codehz greatly improved it.
* @pingms improved its compatibility.
* @pingms fixed the bug of horizontal scrollbar(if browser width is not enough)
* @pingms added "Test Download".
* @pingms added 3-column mode.
* @codehz contributed the color effect.
* @pingms improved the compatibility of color effect.
*
* (@pingms - https://github.com/pingms)
* (@codehz - https://github.com/codehz)
*
*
*
*/
* {
box-sizing: border-box;
/* Include padding and border in the element's total width and height */
}
body {
background: #4CAF50;
color: #ffffff;
font-size: 14px;
font-family: Tahoma, Helvetica, Arial, sans-serif;
margin: 8px;
--item-height: 18px;
--section-header-height: 30px;
/* Double leading dash is used for defining custom properties */
padding: 10px 0px 10px 0px;
margin: 0px;
}
p {
display: flex;
/* This defines a flex container */
/* It enables a flex context for all its direct children */
}
a:link, a:visited, a:hover, a:active {
color: LightBlue;
}
.content {
/* width: 600px; */
/* "width: 600px;" is disabled */
/* because it can cause horizontal scrollbar */
/* if browser width is not enough */
width: 95%;
/* If it's in the mode of "two columns" */
/* ".content" width will be changed by "@media (min-width: 800px)"*/
max-width: calc(100vw - 16px);
/* calc() function performs a calculation to be used as the property value */
/* vw: 1/100th viewport width */
margin: 0 auto;
/* The first parameter 0 indicates that the top and bottom margins will both be set to 0 */
/* The left and right margins will be set to the same size */
}
section {
overflow: hidden;
break-inside: avoid-column;
-webkit-column-break-inside: avoid;
/* Avoids any break (page, column, or region) from being inserted within the principal box */
top: 0;
position: relative;
--max-delay: 1;
transition: all ease 1s;
/* CSS transitions allows you to change property values smoothly */
/* (from one value to another), over a given duration */
/* all - specified for the transition-property */
/* ease - specifies a transition effect with a slow start, then fast, then end slowly */
height: calc(var(--nums) * (var(--item-height) + 2px) + var(--section-header-height));
}
h3 {
font-size: 20px;
font-weight: 900;
height: var(--section-header-height);
margin: 0;
padding: 0;
}
section>div {
/* > */
/* The selector "div > p.some_class" only selects paragraphs of */
/* ".some_class" that are nested directly inside a div */
/* and not any paragraphs that are nested further within. */
width: 100%;
position: absolute;
height: calc(var(--item-height));
margin: 1px 0;
transition: all ease .5s;
display: flex;
--delay: 0;
transform: translateY(calc(var(--index) * (var(--item-height) + 2px)));
/* The translateY() CSS function repositions an element vertically on the 2D plane */
z-index: calc(var(--nums) - var(--index) + 1);
padding-left: 3px;
}
section>div>div.bar {
/* Pseudo elements(":after") are replaced by ordinary elements. */
content: "";
position: absolute;
left: 55px;
right: 0;
top: 0;
bottom: 0;
/* --base-color: rgb(calc(var(--delay) / var(--max-delay) * 200), calc(255 - var(--delay) / var(--max-delay) * 128), 0); */
/* "--base-color" is disabled for compatibility */
/* --percent: calc(var(--delay) / var(--max-delay) * 100%); */
/* "--percent" is replaced by "--percent-number" */
/* background: linear-gradient(to right, var(--base-color) var(--percent), transparent var(--percent)); */
/* "background: linear-gradient" is disabled for compatibility */
/* background: DarkOliveGreen; */
/* "background: DarkOliveGreen" is disabled */
--barColorR: 0;
--barColorG: 255;
--barColorB: 0;
background: rgb(calc(var(--barColorR)),calc(var(--barColorG)),calc(var(--barColorB)));
--percent-number: calc(var(--delay) * 100 / var(--max-delay));
width: calc((100% - 85px) * var(--percent-number) / 100);
z-index: -1;
transition: all ease 1s;
height: calc(var(--item-height));
display: inline-block;
}
.result {
display: inline-block;
width: 55px;
font-family: 'Lucida Console', Monaco, monospace;
font-size: 12px;
text-align: right;
padding-right: .5em;
}
.name {
/* flex: 1; */
/* Let all the flexible items be the same length, regardless of its content */
/* "flex: 1" is disabled */
display: inline-block;
height: calc(var(--item-height));
vertical-align: middle;
line-height: calc(var(--item-height));
}
.tip {
position: absolute;
z-index: 100;
width: 120px;
left: 0px;
opacity: 0.2;
visibility: hidden;
background-color: SeaGreen;
color: #fff;
text-align: center;
border-radius: 4px;
display: inline-block;
height: calc(var(--item-height));
font-weight: normal !important;
font-style: normal !important;
}
.name:hover .tip {
animation: tipAnimation 5s ease forwards;
}
.name:hover {
font-weight: bold;
font-style: italic;
}
@keyframes tipAnimation {
10% {
visibility: visible;
left: calc(100% - 120px);
opacity:1;
}
60% {
visibility: visible;
left: calc(100% - 120px);
opacity: 1;
}
100% {
visibility: hidden;
left: calc(100% - 120px);
opacity: 0;
}
}
.usage {
font-style: italic;
}
img {
position: absolute;
opacity: 0;
}
.header {
display: flex;
flex-direction: column;
padding: 0px 0px 10px 0px;
}
.title{
font-size: 26px;
font-weight: bold;
padding: 0px 0px 0px 0px;
}
.introduction {
font-size: 13px;
padding: 0px 0px 0px 10px;
}
.message {
position: fixed;
top: 0px;
left: 50%;
width: 200px;
margin-top: 0px;
margin-left: -100px;
background-color: DarkGreen;
color: white;
z-index: 10000;
padding: 10px;
padding-top: 20px;
border-radius: 0px 0px 25px 25px;
}
@media (min-width: 650px) and (max-width: 949px) {
#result {
column-count: 2;
/* The column-count property specifies */
/* the number of columns an element should be divided into */
column-gap: 20px;
/* The column-gap property specifies the gap between the columns. */
column-rule-style: solid;
/* Specify the style of the rule between columns */
column-rule-width: 1px;
/* The column-rule-width property specifies */
/* the width of the rule between columns. */
column-rule-color: white;
/* Specify the color of the rule between columns */
}
.content {
width: 600px;
}
/* In the mode of "two columns", set ".content" width */
.header {
display: flex;
flex-direction: row;
}
.title {
padding: 6px 0px 0px 0px;
}
}
@media (min-width: 950px) {
#result {
column-count: 3;
/* The column-count property specifies */
/* the number of columns an element should be divided into */
column-gap: 20px;
/* The column-gap property specifies the gap between the columns. */
column-rule-style: solid;
/* Specify the style of the rule between columns */
column-rule-width: 1px;
/* The column-rule-width property specifies */
/* the width of the rule between columns. */
column-rule-color: white;
/* Specify the color of the rule between columns */
}
.content {
width: 900px;
}
/* In the mode of "two columns", set ".content" width */
.header {
display: flex;
flex-direction: row;
}
.title {
padding: 0px 0px 0px 0px;
}
}
/*
*
*
* END OF FILE
* The full project is at https://github.com/pingms/pingms
*
*
*/