Skip to content

Instantly share code, notes, and snippets.

@kobitoDevelopment
Created June 11, 2025 01:30
Show Gist options
  • Save kobitoDevelopment/4b2d37b5ccf10401da5e93cae51bd220 to your computer and use it in GitHub Desktop.
Save kobitoDevelopment/4b2d37b5ccf10401da5e93cae51bd220 to your computer and use it in GitHub Desktop.
.background-image {
width: 100%;
height: 100vh;
object-fit: cover;
}
.glass {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 680px;
height: 100px;
border-radius: calc(1px * infinity);
background-color: rgba(255, 255, 255, 0.3);
backdrop-filter: blur(10px);
box-shadow: 0 0px 4px rgba(0, 0, 0, 0.1);
border: 2px solid rgba(255, 255, 255, 0.2);
}
.glass:before {
content: "";
position: absolute;
inset: 8px;
z-index: 2;
border-radius: calc(1px * infinity);
background-color: rgba(0, 0, 0, 0.5);
filter: blur(20px);
}
<div class="glass">
<div class="background"></div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment