-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathacceleration.html
83 lines (77 loc) · 2.28 KB
/
acceleration.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
<!DOCTYPE html>
<link rel="stylesheet" type="text/css" href="style.css">
<html>
<body style="background-color:powderblue;">
<h1> Acceleration Calculator </h1>
<div class="accelerationBody">
<form onsubmit="return false;" method="post">
<input placeholder="Distance Traveled" type="text" id="civ" />
<input placeholder="Time took" type="text" id="cit" />
<input type="submit" onclick="calculate();" id="accelSubmit" />
</div>
</form>
<a href="index.html">
<button>Back to Calculators</button>
</a>
<script>
//function getInput() {
/* var termVelCalc = document.getElementById("termVel").value;
var initVelCalc = document.getElementById("initVel").value;
var accelCalc = document.getElementById("accel").value;
alert(termVelCalc + " " + initVelCalc + " " + accelCalc);}*/
function calculate() {
var civCalc = document.getElementById("civ").value;
var citCalc = document.getElementById("cit").value;
var answer = civCalc / citCalc
alert("Answer: " + answer + " ft/s^2");
}
</script>
<style>
@import url('https://fonts.googleapis.com/css?family=Quicksand:300,500');
h1 {
text-align: center;
font-size: 30px;
font-family: 'Quicksand', sans-serif;
}
button {
appearance: button;
backface-visibility: hidden;
background-color: #405cf5;
border-radius: 6px;
border-width: 0;
box-shadow: rgba(50, 50, 93, .1) 0 0 0 1px inset, rgba(50, 50, 93, .1) 0 2px 5px 0, rgba(0, 0, 0, .07) 0 1px 1px 0;
box-sizing: border-box;
color: #fff;
cursor: pointer;
font-family: -apple-system, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Ubuntu, sans-serif;
font-size: 100%;
height: 44px;
line-height: 1.15;
margin: 12px 0 0;
outline: none;
overflow: hidden;
padding: 0 25px;
position: relative;
text-align: center;
text-transform: none;
transform: translateZ(0);
transition: all .2s, box-shadow .08s ease-in;
user-select: none;
-webkit-user-select: none;
touch-action: manipulation;
width: 100%;
}
button:disabled {
cursor: default;
}
button:focus {
box-shadow: rgba(50, 50, 93, .1) 0 0 0 1px inset, rgba(50, 50, 93, .2) 0 6px 15px 0, rgba(0, 0, 0, .1) 0 2px 2px 0, rgba(50, 151, 211, .3) 0 0 0 4px;
}
button:hover {
background-color: #E01E79;
border: 2px solid white;
font-weight: 500;
}
</style>
</body>
</html>