-
Notifications
You must be signed in to change notification settings - Fork 0
/
math.html
115 lines (98 loc) · 2.67 KB
/
math.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>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Fun with Math!</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
* {
box-sizing: border-box;
}
body {
text-transform: uppercase;
text-align: center;
font-size: 25px;
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
background-color: beige;
}
.green {
color: green;
}
.maroon {
color: maroon;
}
.red {
color: red;
}
#result {
font-weight: bold;
}
#container {
border: 3px solid seagreen;
width: 900px;
border-radius: 20px;
color: black;
font-weight: bold;
background-color: #fffeba;
margin: 80px auto 0;
padding: 30px;
}
#equation span {
color: #2c2489;
text-shadow: black 2px 2px;
}
button {
margin-top: 2px;
height: 60px;
border-radius: 8px;
font-size: 18px;
width: 100px;
background: #3cd163;
color: white;
border: none;
vertical-align: top;
cursor: pointer;
}
input {
width: 50%;
height: 60px;
font-size: 25px;
border-radius: 10px;
border: 1px solid #c1d651;
padding: 5px;
}
p.right {
font-size: 20px;
}
small {
font-size: 18px;
}
</style>
</head>
<body onload="start();">
<div id="container">
<p>Fun with math!</p>
<p class="right">Score:
<span id="score">0</span>
</p>
<h1 id="equation">
<span id="number1"></span>
<span id="operator"></span>
<span id="number2"></span>
</h1>
<p>Please enter your answer in the box below: </p>
<input type="text" placeholder="Type here ..." id="answer" />
<button type="button" id="checkAnswer" onclick="checkAnswer();">Check</button>
<button type="button" onclick="start();">Next</button>
<button type="button" id="reset" onclick="reset();">Try Again</button>
</div>
<p id="result"></p>
<p>
<small>Developed by Huzaifa Mustafa</small>
</p>
<script src="math.js"></script>
</body>
</html>