-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
115 lines (103 loc) · 3.02 KB
/
index.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<script src="app.js"></script>
<title>BMI Calculator</title>
<style>
body {
height: 100vh;
background: #151515;
color: #f5f5f5;
}
.container {
background-color: #3C415C;
font-family: 'Poppin', sans-serif;
padding: 40px 40px;
width: 400px;
position: absolute;
top: 50%;
left: 50%;
border-radius: 8px;
transform: translate(-50%, -50%);
box-shadow: 25px 25px 30px rgba(0, 0, 0, 0.15);
}
.container h2 {
box-shadow: 0 0 5px #151515;
background-color: #301B3F;
text-align: center;
font-size: 30px;
letter-spacing: 3px;
border-radius: 8px;
margin-top: -30px;
margin-right: -30px;
margin-bottom: 40px;
margin-left: -30px;
}
.output {
box-shadow: 0 0 10px #151515;
margin-bottom: 65px;
border-radius: 8px;
padding: 3px;
}
#index {
font-size: 25px;
text-align: center;
color: white;
}
#category {
font-size: 20px;
text-align: center;
color: #4E9F3D;
font-weight: 750;
}
.row {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 50px;
}
.row span {
font-weight: 650;
}
input[type="range"] {
width: 75%;
height: 5px;
-webkit-appearance: none;
appearance: none;
background-color: #151515;
border-radius: 5px;
outline: none;
}
input[type="range"]::-webkit-slider-thumb{
-webkit-appearance: none;
appearance: none;
height: 17px;
width: 17px;
background-color: #DDDDDD;
border-radius: 30%;
cursor: pointer;
}
</style>
</head>
<body>
<div class="container">
<h2>Body Mass Index Calculator</h2>
<div class="output">
<h4 id="index">20.83</h4>
<h4 id="category">Normal Weight</h4>
</div>
<div class="row">
<input type="range" min="10" max="250" value="30" id="weight" oninput="calc()">
<span id="weight-value">30 kg</span>
</div>
<div class="row">
<input type="range" min="100" max="250" value="120" id="height" oninput="calc()">
<span id="height-value">120 cm</span>
</div>
</div>
</body>
</html>