-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
114 lines (95 loc) · 2.49 KB
/
index.html
File metadata and controls
114 lines (95 loc) · 2.49 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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Conversions</title>
<!-- MOBILE––––––––––––––––––––––– -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://api.fonts.coollabs.io/css2?family=Lato&display=swap" rel="stylesheet">
<link rel="icon" type="image/png" href="favicon.png">
<link rel="preload" href="unit_conversions/conversions.js" as="scipt">
</head>
<style>
html {
height: 100%;
}
body {
font-family: 'Lato', sans-serif;
font-size: 120%;
display: flex;
flex-direction: column;
align-items: center;
color: #555;
background: #ecf0f3;
padding: 20px;
}
section {
justify-content: center;
text-align: center;
padding: 35px;
border-radius: 40px;
background: #ecf0f3;
box-shadow: 13px 13px 20px #cbced1,
-13px -13px 20px #ffffff;
margin-bottom: 40px;
width: -webkit-fill-available;
max-width: 700px;
width: 80%;
transition: all 0.3s ease-in-out;
}
input {
box-sizing: border-box;
-webkit-box-sizing: border-box;
border-radius: 35px;
box-shadow: inset 4px 4px 4px #cbced1,
inset -4px -4px 4px #ffffff;
border: none;
outline: none;
background: none;
font-size: 18px;
color: #555;
padding: 20px 35px 20px 5px;
transition: all 0.3s ease-in-out;
width: 100%;
margin: 0 0 30px -10px;
text-align: right;
}
@media screen and (min-width: 600px) {
input {
width: auto;
}
}
input:hover {
box-shadow: none;
}
input:focus {
box-shadow: inset 8px 8px 8px #cbced1,
inset -8px -8px 8px #ffffff;
}
</style>
<body>
<h1>Unit Conversions</h1>
<section>
<h3>Energy</h3>
<input id="inputenergy" type="number" oninput="convert(energies)" value="12"></input>
<span style="margin-left:-35px;">J</span>
<div id="outputenergy">
</div>
</section>
<section>
<h3>Distance</h3>
<input id="inputdistance" type="number" oninput="convert(distances)" value="100"></input>
<span style="margin-left:-35px;">m</span>
<div id="outputdistance">
</div>
</section>
<section>
<h3>Mass</h3>
<input id="inputmass" type="number" oninput="convert(masses)" value="25"></input>
<span style="margin-left:-35px;">kg</span>
<div id="outputmass">
</div>
</section>
<script type="text/javascript" src="unit_conversions/conversions.js"></script>
</body>
</html>