-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
88 lines (87 loc) · 2.72 KB
/
index.html
File metadata and controls
88 lines (87 loc) · 2.72 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
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Calculadora</title>
<style>
body{
background-color: rgb(134, 11, 11);
}
td{
border: 1px solid rgb(0, 0, 0);
background-color: rgba(29, 26, 26, 0.774);
color: aliceblue;
border-radius: 5px;
width: 80px;
height: 41px;
text-align: center;
font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
cursor: pointer;
}
.conteiner{
width: 250px;
height: 320px;
margin: 0 auto;
background-color: black;
border-radius: 5px;
}
input{
width: 95%;
height: 24px;
border-radius: 7px;
margin: 10px 0;
color: white;
background-color: black;
border: none;
text-align: right;
font-size: 1.5em;
padding-right: 10px;
}
h2{
color: aliceblue;
display: flex;
justify-content: center;
align-items: center;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
</style>
</head>
<body>
<div class="conteiner">
<h2>Calculadora</h2>
<input type="text" id="display" disabled>
<table class="border">
<tr>
<td onclick="clearDisplay()">C</td>
<td onclick="backspace()"><</td>
<td onclick="appendSymbol('/')">/</td>
<td onclick="appendSymbol('*')">X</td>
</tr>
<tr>
<td onclick="appendSymbol('7')">7</td>
<td onclick="appendSymbol('8')">8</td>
<td onclick="appendSymbol('9')">9</td>
<td onclick="appendSymbol('-')">-</td>
</tr>
<tr>
<td onclick="appendSymbol('4')">4</td>
<td onclick="appendSymbol('5')">5</td>
<td onclick="appendSymbol('6')">6</td>
<td onclick="appendSymbol('+')">+</td>
</tr>
<tr>
<td onclick="appendSymbol('1')">1</td>
<td onclick="appendSymbol('2')">2</td>
<td onclick="appendSymbol('3')">3</td>
<td onclick="calculate()" rowspan="2">=</td>
</tr>
<tr>
<td onclick="appendSymbol('0')" colspan="2">0</td>
<td onclick="appendSymbol('.')">.</td>
</tr>
</table>
</div>
<script src="calculadora.js"></script>
</body>
</html>