-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
85 lines (72 loc) · 1.45 KB
/
styles.css
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
body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
}
header {
background-color: #333;
padding: 20px;
color: #fff;
text-align: center;
}
main {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
min-height: calc(100vh - 80px);
}
section {
flex-basis: 33.33%;
height: 300px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
background-size: cover;
background-position: center;
transition: transform 0.3s ease;
position: relative;
}
#men {
background-image: url("menbg.jpg");
}
#women {
background-image: url("womenbg.jpg");
}
#kids {
background-image: url("kidsbg.jpg");
}
h2 {
font-size: 24px;
margin-bottom: 10px;
position: relative;
z-index: 1;
}
/* Adjustments for opacity and text color */
section::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.4);
z-index: 0;
}
@media screen and (max-width: 768px) {
section {
flex-basis: 100%;
height: 200px;
}
h2 {
font-size: 18px;
}
}
/* Animation effects */
section:hover {
transform: scale(1.1);
}
section:active {
transform: scale(0.9);
}