-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathageselect.html
92 lines (88 loc) · 2.12 KB
/
ageselect.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Enter your age</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
rel="stylesheet"
/>
<style>
* {
font-family: "Roboto", sans-serif;
box-sizing: border-box;
}
body,
html {
padding: 0;
margin: 0;
background-color: black;
height: 100%;
}
body {
display: flex;
align-items: center;
justify-content: center;
}
.main {
background-color: #222;
width: fit-content;
border-radius: 10px;
padding: 10px;
text-align: center;
}
h1,
h2 {
padding: 0;
margin: 0;
margin-bottom: 10px;
color: white;
}
input,
button {
width: 500px;
padding: 10px;
font-size: 20px;
border-radius: 10px;
outline: 0;
border: 0;
background-color: #333;
color: white;
transition-duration: 100ms;
}
</style>
</head>
<body>
<div class="main">
<h1>Select your age</h1>
<h2>0</h2>
<input
type="range"
name="age"
id="age"
value="0"
min="-1"
max="6969"
step="1"
oninput="document.querySelector('h2').innerHTML=(this.value)"
/>
<br />
<button onclick="document.querySelector('input').style.width = '2000px'">
Make slider big
</button>
<br />
<br />
<button onclick="document.querySelector('input').style.width = '10px'">
Make slider small
</button>
<br />
<br />
<button onclick="document.querySelector('input').style.width = '500px'">
Reset
</button>
</div>
</body>
</html>