Skip to content

Commit f07b746

Browse files
committed
make hero background blur
1 parent 985f4b4 commit f07b746

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

src/pages/index.module.css

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
* and scoped locally.
44
*/
55

6-
.heroBanner {
6+
.heroBanner {
77
padding: 4rem 0;
88
text-align: center;
99
position: relative;
1010
overflow: hidden;
11+
color: white;
1112
}
1213

1314
@media screen and (max-width: 996px) {
@@ -23,8 +24,23 @@
2324
}
2425

2526
.heroBanner {
26-
background-image: url('/img/ss2d.svg'); /* Relative to the `static` folder */
27-
background-size: cover; /* Ensures the image covers the entire area */
2827
background-position: center; /* Centers the image */
28+
position: relative;
2929
color: white;
30+
z-index: 0; /* Ensure the heroBanner content is above the pseudo-element */
31+
}
32+
33+
.heroBanner::before {
34+
content: "";
35+
position: absolute;
36+
top: 0;
37+
left: 0;
38+
right: 0;
39+
bottom: 0;
40+
background-image: url('/img/ss2d.svg'); /* Relative to the `static` folder */
41+
background-size: cover;
42+
background-position: center;
43+
filter: blur(5px); /* Adjust the value as needed */
44+
z-index: -1; /* Ensure the pseudo-element is behind the content */
45+
pointer-events: none; /* Allow interactions with content above the pseudo-element */
3046
}

0 commit comments

Comments
 (0)