Skip to content

Commit a9edb67

Browse files
authored
Merge pull request #72 from mansibamgude/main
solved build attractive CSS
2 parents 8438181 + 65161e6 commit a9edb67

File tree

2 files changed

+106
-18
lines changed

2 files changed

+106
-18
lines changed

React-Weather-app/src/App.css

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
1+
/* App.css */
12
.App {
23
display: flex;
34
align-items: center;
45
justify-content: center;
56
text-align: center;
7+
min-height: 100vh; /* Ensure the container covers the full viewport height */
8+
background: linear-gradient(to bottom, #f0f2f5, #ffffff); /* Gradient background for a subtle effect */
9+
color: #333; /* Darker text color for better readability */
10+
font-family: 'Arial', sans-serif; /* Clean, modern font */
611
}
712

813
.App-logo {
9-
height: 40vmin;
14+
height: 60vmin; /* Slightly larger logo */
1015
pointer-events: none;
16+
transition: transform 0.3s ease-in-out; /* Smooth scaling effect on hover */
17+
}
18+
19+
.App-logo:hover {
20+
transform: scale(1.1); /* Slight zoom effect on hover */
1121
}
1222

1323
@media (prefers-reduced-motion: no-preference) {
1424
.App-logo {
15-
animation: App-logo-spin infinite 20s linear;
25+
animation: App-logo-spin infinite 15s linear; /* Faster spin animation */
1626
}
1727
}
1828

@@ -23,12 +33,22 @@
2333
flex-direction: column;
2434
align-items: center;
2535
justify-content: center;
26-
font-size: calc(10px + 2vmin);
27-
color: white;
36+
font-size: calc(12px + 2vmin); /* Slightly larger font size */
37+
color: #ffffff;
38+
padding: 20px; /* Added padding for spacing */
39+
border-radius: 10px; /* Rounded corners for a softer look */
40+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
2841
}
2942

3043
.App-link {
3144
color: #61dafb;
45+
text-decoration: none; /* Remove underline */
46+
font-weight: bold; /* Make the link text bold */
47+
transition: color 0.3s ease; /* Smooth color transition */
48+
}
49+
50+
.App-link:hover {
51+
color: #21a1f1; /* Change color on hover */
3252
}
3353

3454
@keyframes App-logo-spin {

calculator-react/src/App.css

Lines changed: 82 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,95 @@
1+
/* App.css */
2+
3+
body {
4+
background: linear-gradient(to right, #e3f2fd, #bbdefb);
5+
font-family: 'Roboto', sans-serif;
6+
display: flex;
7+
justify-content: center;
8+
align-items: center;
9+
height: 100vh;
10+
margin: 0;
11+
overflow: hidden; /* Prevents scrollbars from appearing */
12+
}
13+
14+
.calculator-body {
15+
max-width: 420px;
16+
margin: 20px;
17+
padding: 30px;
18+
background: linear-gradient(135deg, #ffffff, #f7f9fc);
19+
border-radius: 20px;
20+
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
21+
text-align: center;
22+
transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
23+
}
24+
25+
.calculator-body:hover {
26+
transform: scale(1.03);
27+
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
28+
background-color: #f4f6f8; /* Slightly changes background color on hover */
29+
}
30+
31+
h1 {
32+
color: #1e88e5;
33+
margin-bottom: 20px;
34+
font-weight: 700;
35+
letter-spacing: 2px;
36+
font-size: 2.5em;
37+
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
38+
}
39+
140
.result {
2-
height: 60px;
3-
background-color: #bbb;
4-
width: 100%;
41+
height: 80px;
42+
background-color: #ffffff;
43+
border-radius: 12px;
44+
margin-bottom: 20px;
45+
display: flex;
46+
align-items: center;
47+
justify-content: center;
48+
box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.1);
49+
border: 1px solid #e0e0e0;
550
}
651

752
.result p {
853
font-size: 40px;
9-
margin: 5px;
10-
54+
color: #212121;
55+
margin: 0;
56+
font-weight: 600;
57+
letter-spacing: 1px;
1158
}
1259

13-
.calculator-body {
14-
max-width: 400px;
15-
margin: auto;
60+
.keypad {
61+
display: flex;
62+
flex-wrap: wrap;
63+
justify-content: center;
1664
}
1765

1866
.button {
19-
display: block;
20-
background-color: #bbb;
67+
background: linear-gradient(145deg, #66bb6a, #4CAF50);
68+
border: none;
69+
color: white;
70+
padding: 15px 25px;
71+
margin: 8px;
72+
text-align: center;
73+
display: inline-block;
74+
font-size: 24px;
75+
border-radius: 12px;
76+
cursor: pointer;
77+
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
78+
transition: background 0.3s, transform 0.1s, box-shadow 0.3s;
79+
}
80+
81+
.button:hover {
82+
background: linear-gradient(145deg, #5ebd5b, #45a049);
83+
transform: translateY(-2px);
84+
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
85+
}
86+
87+
button:focus {
88+
outline: none;
89+
box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.6);
2190
}
2291

23-
button {
24-
width: 25%;
25-
height: 60px;
26-
font-size: 30px;
92+
button:active {
93+
background: linear-gradient(145deg, #4CAF50, #66bb6a);
94+
transform: translateY(1px); /* Slightly move down on press */
2795
}

0 commit comments

Comments
 (0)