Skip to content

Commit 4995b96

Browse files
committed
Add styles for buttons
1 parent adc56b8 commit 4995b96

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed

Source-Code/Calculator/style.css

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
* {
2+
box-sizing: border-box;
3+
}
4+
5+
body {
6+
display: flex;
7+
justify-content: center;
8+
align-items: center;
9+
height: 100vh;
10+
background: #f9f6ee;
11+
font-family: 'Roboto', sans-serif;
12+
}
13+
14+
.calculator {
15+
border-radius: 10px;
16+
overflow: hidden;
17+
box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
18+
}
19+
20+
.calculator-screen {
21+
width: 100%;
22+
height: 100px;
23+
border: none;
24+
background-color: #252525;
25+
color: white;
26+
text-align: right;
27+
padding: 10px 20px;
28+
font-size: 2.5rem;
29+
}
30+
31+
.calculator-keys {
32+
display: grid;
33+
grid-template-columns: repeat(4, 1fr);
34+
gap: 10px;
35+
padding: 20px;
36+
background-color: #f1f3f6;
37+
}
38+
39+
button {
40+
height: 60px;
41+
border-radius: 5px;
42+
border: none;
43+
font-size: 1.5rem;
44+
color: white;
45+
background-color: #333;
46+
cursor: pointer;
47+
transition: background-color 0.2s ease;
48+
}
49+
50+
button:hover {
51+
background-color: #555;
52+
}
53+
54+
.operator {
55+
background-color: #f39c12;
56+
}
57+
58+
.operator:hover {
59+
background-color: #d87a0d;
60+
}
61+
62+
.equal-sign {
63+
height: calc(80px + 10px);
64+
grid-column: span 4;
65+
font-size: 30px;
66+
}
67+
68+
.all-clear {
69+
background-color: #e74c3c;
70+
}
71+
72+
.all-clear:hover {
73+
background-color: #c0392b;
74+
}
75+
76+
.decimal {
77+
background-color: #9b59b6;
78+
}
79+
80+
.decimal:hover {
81+
background-color: #8e44ad;
82+
}

0 commit comments

Comments
 (0)