Implementing Frosted Glass, Acrylic, Neumorphism, and Glassmorphism UI Effects with CSS
This article explains the evolution and practical CSS techniques for creating Frosted Glass, Acrylic Material, Neumorphism, and Glassmorphism UI effects, providing design background, accessibility considerations, and complete code examples for implementing these styles in modern web projects.
Development History
The article traces the origins of translucent UI effects such as Microsoft Fluent's Acrylic Material, macOS Frosted Glass, iOS background blur (2013), and the more recent Neumorphism (2020) and Glassmorphism (2021) trends, highlighting their adoption in operating systems and design tools.
Design Details
It discusses the visual principles of each style—layered background, blur, and shadow—and notes accessibility concerns, especially for Neumorphism, which can be problematic for users with visual impairments.
Implementation with CSS
For each effect, the article provides concrete CSS snippets. The core properties used are filter , backdrop-filter , opacity , and box-shadow . Example code for a basic card component is shown:
body {
background: url("/glassmorphism-css-11.jpeg") no-repeat center fixed;
background-size: cover;
}Frosted Glass effect:
.card {
background: rgba(255,255,255,0.3);
filter: blur(10px);
}To avoid blurring child elements, a pseudo‑element is used:
.card::before {
content: "";
position: absolute;
inset: 0;
border-radius: 8px;
background: inherit;
filter: blur(10px);
z-index: 1;
}Acrylic Material adds an extra ::after layer for a subtle color tint:
.card::after {
content: "";
position: absolute;
inset: 0;
background: #fff;
opacity: 0.3;
border-radius: 8px;
z-index: -1;
}Neumorphism relies on dual shadows:
.card {
background-color: #f1f8fd;
box-shadow: 20px 20px 30px rgba(0,0,0,0.1), -20px -20px 30px rgba(255,255,255,0.7);
}Glassmorphism combines a gradient background, rounded corners, and a strong backdrop-filter: blur(20px) :
.card {
border-radius: 40px;
background-image: linear-gradient(to right bottom, rgba(255,255,255,0.4), rgba(255,255,255,0.1));
backdrop-filter: blur(20px);
border: 3px solid transparent;
background-origin: border-box;
background-clip: padding-box, border-box;
box-shadow: 20px 20px 22px rgba(0,0,0,0.2);
}Additional examples show how to apply these styles to media and content layers, adjust gradients, and add subtle borders for depth.
Conclusion
Frosted Glass, Acrylic, Neumorphism, and Glassmorphism share similar implementation patterns—primarily CSS filter or backdrop-filter combined with layered backgrounds and shadows—allowing front‑end developers to recreate modern, eye‑catching UI effects efficiently.
Rare Earth Juejin Tech Community
Juejin, a tech community that helps developers grow.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.