-
Notifications
You must be signed in to change notification settings - Fork 21
/
bmi.html
183 lines (164 loc) · 5.23 KB
/
bmi.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
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
Calculator using HTML Example
</title>
<link href="https://fonts.googleapis.com/css2?family=Cookie&display=swap" rel="stylesheet">
<!-- CSS property to create interactive
calculator interface -->
<style>
html {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background-color: #2d3436;
background-image: linear-gradient(315deg, #8433A0 17%, #FFAC33 74%);
background-image: url('https://wallpaperaccess.com/full/834264.jpg');
font-family: 'Cookie', cursive;
}
.title {
margin-bottom: 10px;
padding: 5px 0;
font-size: 40px;
font-weight: bold;
text-align: center;
color: white;
font-family: 'Cookie', cursive;
}
input[type=button] {
width: 60px;
height: 60px;
float: left;
padding: 0;
margin: 5px;
box-sizing: border-box;
background: #eddde7;
border: none;
font-size: 30px;
line-height: 30px;
border-radius: 50%;
font-weight: 700;
color: #3F1E55;
cursor: pointer;
}
input[type=text] {
width: 250px;
height: 60px;
float: left;
padding: 0;
box-sizing: border-box;
border: none;
background: none;
color: rgb(254, 250, 250);
text-align: right;
font-weight: 700;
font-size: 60px;
line-height: 60px;
margin: 0 25px;
}
.calculator {
background-color: #5521ff;
box-shadow: 0px 0px 0px 10px rgb(49, 197, 227);
border: 5px solid black;
border-radius: 10px;
}
#display {
height: 60px;
width: 250px;
text-align: right;
background-color: black;
border: 5px solid rgb(240, 234, 234);
font-size: 30px;
padding-right: 10px;
left: 0px;
top: 0px;
color: rgb(247, 240, 240);
}
.btnTop {
color: white;
background-color: #c79c9c;
font-size: 14px;
margin: auto;
width: 50px;
height: 25px;
}
@media (max-width: 470px)
{
#Titleid{
font-size: 19px;
font-style: oblique;
padding-bottom: 30px;
padding-top: 10px;
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}
#display{
width: 250px;
height: 60px;
text-align: right;
background-color: rgb(26, 1, 1);
border: 5px solid rgb(240, 234, 234);
font-size: 30px;
padding: 0px;
color: rgb(247, 240, 240);
}
#calcTable{
width: 50px;
}
#td-id{
padding-top: 5px;
padding-bottom: 5px;
padding-right: 0px;
}
#td-id-display{
padding-left: 0px;
padding-right: 0px;
}
}
</style>
</head>
<body>
<div id="Titleid" class = "title" align="center">
Calculate Your Body Mass Index
</div>
<div id="Titleid" class = "title" align="center">
As BMI = (Weight/ Height × Height)
</div>
<form name="Calculator" class = "calculator" >
<table id="calcTable" border="2" align="center" cellpadding="15" cellspacing="12" bgcolor="#ffd1d3">
<tr id="tr-id">
<td id="td-id-display">
<input type="text" name="Input" Size="35" class="Display" id="display">
<br>
</td>
</tr>
<tr id="tr-id">
<td id="td-id">
<input type="button" name = "one" style="font-size:30px" value=" 1 " OnClick="Calculator.Input.value += '1'">
<input type="button" name = "two" style = "font-size:30px" value=" 2 " OnCLick="Calculator.Input.value += '2'">
<input type="button" name = "three" style="font-size:30px" value=" 3 " OnClick="Calculator.Input.value += '3'">
<input type="button" name="add" class ="btnTop" style="font-size:30px" value=" + " OnClick="Calculator.Input.value += ' + '">
<br>
<input type="button" name = "four" style="font-size:30px" value=" 4 " OnClick="Calculator.Input.value += '4'">
<input type="button" name = "five" style="font-size:30px" value=" 5 " OnCLick="Calculator.Input.value += '5'">
<input type="button" name = "six" style="font-size:30px" value=" 6 " OnClick="Calculator.Input.value += '6'">
<input type="button" name = "minus" style="font-size:30px" value=" − " OnClick="Calculator.Input.value += ' - '">
<br>
<input type="button" name = "seven" style="font-size:30px" value=" 7 " OnClick="Calculator.Input.value += '7'">
<input type="button" name = "eight" style="font-size:30px" value=" 8 " OnCLick="Calculator.Input.value += '8'">
<input type="button" name = "nine" style="font-size:30px" value=" 9 " OnClick="Calculator.Input.value += '9'">
<input type="button" name = "mul" style="font-size:30px" value=" * " OnClick="Calculator.Input.value += ' * '">
<br>
<input type="button" name = "clear" style="font-size:30px" value=" c " OnClick="Calculator.Input.value = ''">
<input type="button" name="zero" style="font-size:30px" value=" 0 " OnClick="Calculator.Input.value += '0'">
<input type="button" name="DoIt" style="font-size:30px" value=" = " OnClick="Calculator.Input.value = eval(Calculator.Input.value)">
<input type="button" name="div" style="font-size:30px" value=" ÷ " OnClick="Calculator.Input.value += ' ÷ '">
<br>
</td>
</tr>
</table>
</form>
</body>
</html>