-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcalculator.html
More file actions
51 lines (44 loc) · 2.9 KB
/
calculator.html
File metadata and controls
51 lines (44 loc) · 2.9 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Pred's Calculator</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="flex items-center justify-center min-h-screen bg-gradient-to-r from-blue-500 via-purple-500 to-pink-500">
<div class="text-center mb-8">
<h1 class="text-4xl font-bold text-white">Predhome Designs a Calculator</h1>
</div>
<div class="calculator bg-white rounded-lg shadow-lg p-8 w-80">
<div class="display bg-gray-100 rounded-lg h-16 mb-6 flex items-center justify-end px-4 text-2xl font-mono text-gray-700">
0
</div>
<div class="buttons grid grid-cols-4 gap-4">
<!-- Top functions -->
<button class="clear bg-red-500 text-white p-4 rounded-lg text-lg hover:bg-red-600">C</button>
<button class="modulo bg-yellow-500 text-white p-4 rounded-lg text-lg hover:bg-yellow-600">%</button>
<button class="sign bg-green-500 text-white p-4 rounded-lg text-lg hover:bg-green-600">+/-</button>
<button class="divide bg-blue-500 text-white p-4 rounded-lg text-lg hover:bg-blue-600">/</button>
<!-- Numbers and dot -->
<button class="seven bg-gray-200 p-4 rounded-lg text-lg hover:bg-gray-300">7</button>
<button class="eight bg-gray-200 p-4 rounded-lg text-lg hover:bg-gray-300">8</button>
<button class="nine bg-gray-200 p-4 rounded-lg text-lg hover:bg-gray-300">9</button>
<button class="multiply bg-blue-500 text-white p-4 rounded-lg text-lg hover:bg-blue-600">∗</button>
<button class="four bg-gray-200 p-4 rounded-lg text-lg hover:bg-gray-300">4</button>
<button class="five bg-gray-200 p-4 rounded-lg text-lg hover:bg-gray-300">5</button>
<button class="six bg-gray-200 p-4 rounded-lg text-lg hover:bg-gray-300">6</button>
<button class="minus bg-blue-500 text-white p-4 rounded-lg text-lg hover:bg-blue-600">-</button>
<button class="one bg-gray-200 p-4 rounded-lg text-lg hover:bg-gray-300">1</button>
<button class="two bg-gray-200 p-4 rounded-lg text-lg hover:bg-gray-300">2</button>
<button class="three bg-gray-200 p-4 rounded-lg text-lg hover:bg-gray-300">3</button>
<button class="plus bg-blue-500 text-white p-4 rounded-lg text-lg hover:bg-blue-600">+</button>
<button class="zero bg-gray-200 p-4 rounded-lg text-lg hover:bg-gray-300 col-span-2">0</button>
<button class="dot bg-gray-200 p-4 rounded-lg text-lg hover:bg-gray-300">.</button>
<button class="equals bg-purple-500 text-white p-4 rounded-lg text-lg hover:bg-purple-600">=</button>
</div>
</div>
<script src="calculator.js"></script>
</body>
</html>