Skip to content

Commit 858d4f8

Browse files
committed
Add noisy texture overlay to glass container for enhanced visual effect
1 parent 7441e1b commit 858d4f8

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed
Loading

src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function App() {
7272
</section>
7373

7474
{/* Glass container for the whole page content */}
75-
<div class="max-w-3xl mx-auto p-8 bg-white/5 backdrop-blur-2xl border border-white/10 rounded-2xl shadow-xl">
75+
<div class="max-w-3xl mx-auto p-8 bg-white/5 backdrop-blur-2xl border border-white/10 rounded-2xl shadow-xl glass-container-with-texture">
7676

7777
{/* Content sections */}
7878
<div class="w-full mx-auto space-y-12 px-4">

src/index.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,29 @@
3232
font-family: "WorkSans";
3333
src: url("/fonts/Work_Sans/WorkSans-Italic-VariableFont_wght.ttf") format("truetype");
3434
font-display: swap;
35+
}
36+
37+
/* Glass container with noisy texture overlay */
38+
.glass-container-with-texture {
39+
position: relative;
40+
}
41+
42+
.glass-container-with-texture::before {
43+
content: "";
44+
position: absolute;
45+
top: 0;
46+
left: 0;
47+
right: 0;
48+
bottom: 0;
49+
background-image: url('/noisy-texture-100x100-o4-d10-c-f34379-t1.png');
50+
background-repeat: repeat;
51+
opacity: 0.3;
52+
pointer-events: none;
53+
z-index: 1;
54+
border-radius: inherit;
55+
}
56+
57+
.glass-container-with-texture>* {
58+
position: relative;
59+
z-index: 2;
3560
}

0 commit comments

Comments
 (0)