-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswitch.html
More file actions
62 lines (55 loc) · 2.09 KB
/
Copy pathswitch.html
File metadata and controls
62 lines (55 loc) · 2.09 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Calculator</title>
<!-- Tailwind CDN -->
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-gradient-to-br from-indigo-500 to-purple-600 min-h-screen flex items-center justify-center">
<div class="bg-white p-8 rounded-2xl shadow-2xl w-80">
<h1 class="text-2xl font-bold text-center text-gray-700 mb-6">
Simple Calculator
</h1>
<!-- Inputs -->
<div class="space-y-4">
<input
type="text"
id="numA"
placeholder="Enter Number A"
class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-400"
>
<input
type="text"
id="numB"
placeholder="Enter Number B"
class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-400"
>
</div>
<!-- Buttons -->
<div class="grid grid-cols-2 gap-4 mt-6">
<button id="addBtn" class="bg-indigo-500 text-white py-2 rounded-lg hover:bg-indigo-600 transition">
Add
</button>
<button id="subBtn" class="bg-red-500 text-white py-2 rounded-lg hover:bg-red-600 transition">
Sub
</button>
<button id="mulBtn" class="bg-green-500 text-white py-2 rounded-lg hover:bg-green-600 transition">
Mul
</button>
<button id="divBtn" class="bg-yellow-500 text-white py-2 rounded-lg hover:bg-yellow-600 transition">
Div
</button>
</div>
<!-- Result -->
<div class="mt-6 text-center">
<p class="text-gray-600 font-semibold">Result</p>
<div id="result" class="mt-2 text-xl font-bold text-indigo-600">
--
</div>
</div>
</div>
<script src="script.js"></script>
</body>
</html>