-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
116 lines (106 loc) · 3.37 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Calculator</title>
<style>
*,
*::before,
*::after {
box-sizing: border-box;
font-family: Gotham Rounded, sans-serif;
font-weight: normal;
}
body {
margin: 0;
padding: 0;
background: linear-gradient(to bottom, rgb(100, 100, 100), rgb(65, 65, 65));
}
.calculator-grid {
display: grid;
justify-content: center;
align-content: center;
min-height: 100vh;
grid-template-columns: repeat(4, 100px);
grid-template-rows: minmax(120px, auto) repeat(5, 100px);
}
.calculator-grid>button {
cursor: pointer;
font-size: 2rem;
outline: none;
background-color: rbga(255, 255, 255, 0.75);
border-radius: 10px;
border: none;
background-color: #383838;
color: #ececec;
margin: .1rem;
box-shadow: 0 0 9px rgba(74, 61, 255, 0.5);
}
.calculator-grid>button:hover,
.calculator-grid>button:focus {
background-color: #525252;
box-shadow: inset 0px 0px 20px 3px rgba(74, 61, 255, 0.5);
}
.span-two {
grid-column: span 2;
color: #1f2c00 !important;
background-color: #ececec !important;
}
.span-two:hover{
background: #000 !important;
color: #ececec !important;
box-shadow: none !important;
}
.output {
grid-column: 1 / -1;
background-color: rgba(0, 0, 0, 0.75);
display: flex;
align-items: flex-end;
justify-content: space-around;
flex-direction: column;
padding: 10px;
word-wrap: break-word;
word-break: break-all;
border-radius: 10px;
}
.output .previous-operand {
color: rgba(255, 255, 255, 0.75);
font-size: 1.5rem;
}
.output .current-operand {
color: white;
font-size: 2.5rem;
}
</style>
</head>
<body>
<div class="calculator-grid">
<div class="output">
<div class="previous-operand"></div>
<div class="current-operand"></div>
</div>
<button class="clear span-two">AC</button>
<button class="del">C</button>
<button class="operator">/</button>
<button class="number">1</button>
<button class="number">2</button>
<button class="number">3</button>
<button class="operator">*</button>
<button class="number">4</button>
<button class="number">5</button>
<button class="number">6</button>
<button class="operator">+</button>
<button class="number">7</button>
<button class="number">8</button>
<button class="number">9</button>
<button class="operator">-</button>
<button class="number">0</button>
<button class="operator">.</button>
<button class="calculate span-two">=</button>
</div>
<script src="script.js
"></script>
</body>
</html>