-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.css
95 lines (81 loc) · 1.58 KB
/
demo.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
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background: #eee;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}
* {
box-sizing: border-box;
}
input {
border: none;
outline: none;
padding: 4px;
border: 1px solid #aaa;
}
#wrapper {
min-width: min(50%, 600px);
padding: 1em 4em;
background: #fff;
border: 1px solid #ccc;
}
#wrapper > div {
width: 100%;
margin-bottom: 2vh;
user-select: none;
}
#wrapper > div > label {
font-weight: 500;
}
#wrapper > div > * {
display: block;
width: 100%;
margin-bottom: 0.5em;
}
#custom_slider > div {
position: relative;
overflow: hidden;
width: 50%;
height: 2em;
border-radius: 4px;
padding: 0.25em;
margin-top: 0.25em;
background: #bbb;
text-align: center;
box-sizing: border-box;
}
#custom_slider > div * {
position: absolute;
padding: 0;
margin: 0;
top: 0;
left: 0;
height: 100%;
}
#custom_slider input {
margin: 0;
padding: 0;
z-index: 1;
border: none;
outline: none;
background: transparent;
width: 100%;
text-align: center;
}
#custom_slider span {
width: 0;
background: #999;
pointer-events: none;
}
#custom_zone {
display: block;
width: 100%;
}
#custom_zone label {
display: inline-block;
padding-right: 1em;
}