-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
124 lines (100 loc) · 2.08 KB
/
style.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
*{
font-family: "Poppins", sans-serif;
box-sizing: border-box;
font-weight: 600;
margin: 0;
padding: 0;
}
.hero-carousel {
position: relative;
width: 100%;
overflow: hidden;
}
.carousel-slide {
display: none;
position: relative;
}
.carousel-slide img {
width: 100%;
height: 690px;
transition: 0.2s;
}
.carousel-text {
position: absolute;
top: 50%;
left: 30%;
transform: translate(-45%, -50%);
text-align: center;
color: #000;
flex: 1; /* Add this to make text flex-grow */
padding: 0 20px; /* Add padding for spacing */
transition: 0.2s;
}
.carousel-text h2{
font-size: 40px;
letter-spacing: 1px;
font-weight: 800;
}
.carousel-text p{
font-size: 18px;
letter-spacing: 0.7px;
}
.overlay-image {
position: absolute;
top: 20%;
right: 5%;
left: 65%;
/* transform: translate(-45%, -50%); */
max-width: 30%;
max-height: 360px;
border-radius: 10% 0 10% 0;
transition: 0.2s;
}
.prev, .next {
position: absolute;
top: 50%;
transform: translateY(-50%);
background-color: rgba(0, 0, 0, 0.5);
color: #fff;
border: none;
cursor: pointer;
padding: 10px;
z-index: 1000;
}
.prev {
left: 0;
}
.next {
right: 0;
}
/* Add this media query to make the design mobile-friendly for 450px screen size */
@media only screen and (max-width: 450px) {
.carousel-slide img{
height: 600px;
}
.carousel-text{
top: 30%;
width: 100%;
left: 45%;
transition: 0.2s;
}
.carousel-text h2{
font-size: 24px;
transition: 0.2s;
}
.carousel-text p{
font-size: 15px;
transition: 0.2s;
}
.overlay-image{
top: 0%;
left: 45%;
margin-top: 130%;
transform: translate(-45%, -50%);
max-height: 200px;
max-width: 60%;
transition: 0.2s;
}
}