-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
119 lines (113 loc) · 2.3 KB
/
index.html
File metadata and controls
119 lines (113 loc) · 2.3 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Range Slider</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.background {
background: skyblue;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 0%;
z-index: -1;
transition: background-color 0.3s;
}
html {
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
height: 100%;
}
.slider-container {
display: flex;
flex-flow: column;
align-items: center;
justify-items: center;
width: 50px;
background: rgb(233, 233, 233);
border-radius: 100px;
margin-right: 10px;
padding-top: 10px;
padding-bottom: 10px;
}
.slider-container p {
margin-top: 10px;
}
.example-sliders-container {
display: flex;
align-items: flex-end;
touch-action: none;
}
.track {
background: rgb(122, 122, 122);
border-radius: 10px;
cursor: pointer;
height: 170px;
position: relative;
user-select: none;
width: 15px;
touch-action: none;
}
.thumb {
background: rgb(82, 163, 255);
border-radius: 100px;
bottom: 0px;
box-shadow: 0px 2px 2px rgb(71, 71, 71);
cursor: pointer;
left: 50%;
padding: 10px;
position: absolute;
transform: translateX(-50%);
transition: background-color 0.1s;
}
.progress {
background: rgb(255, 31, 31);
border-radius: 100px;
bottom: 0;
min-height: 10px;
position: absolute;
width: 100%;
}
</style>
</head>
<body>
<div class="background" id="background"></div>
<div class="example-sliders-container">
<div
class="slider-container"
data-height="50"
data-progress-color="#CB904D"
></div>
<div
class="slider-container"
data-height="100"
data-progress-color="#75485E"
></div>
<div
class="slider-container"
data-height="200"
data-progress-color="#320E3B"
></div>
<div
class="slider-container"
data-height="300"
data-progress-color="#C3E991"
></div>
<div
class="slider-container"
data-height="400"
data-progress-color="#51A3A3"
></div>
</div>
<script src="main.js"></script>
</body>
</html>