办公设备维修网
资讯中心 您所在的位置:网站首页 资讯中心 最新苹果液体玻璃Liquid Glass效果CSS实现

最新苹果液体玻璃Liquid Glass效果CSS实现

2025-06-23 04:50:46| 来源: 网络整理

最新apple全新液态玻璃效果,但使用CSS实现。

苹果推出“液体玻璃”设计语言:一场深刻的视觉革命及其影响 近期,苹果公司在其全球开发者大会(WWDC 2025)上发布了一项名为“液体玻璃”(Liquid Glass)的全新设计语言,这并非传闻中的新型屏幕材料,而是即将应用于其全线*作系统(包括iOS 26、iPadOS、macOS等)的重大用户界面(UI)革新。这一变化标志着自iOS 7以来苹果最全面的设计更新,预示着其软件和未来硬件发展的战略方向。

什么是“液体玻璃”? “液体玻璃”是一种全新的UI设计美学,其核心在于半透明、动态和光感。它借鉴了visionOS的深度和立体感,旨在让界面元素模拟真实世界中玻璃的光学特性。

主要特征包括:

半透明材质: 系统中的窗口、菜单栏、按钮和控件等元素将呈现出半透明的玻璃质感。实时光影折射: 界面元素会实时地、动态地反射和折射其背后的壁纸、应用内容或颜色,创造出一种流动和通透的视觉效果。动态高光与响应: 当用户与设备交互或移动设备时,界面上的“玻璃”元素会产生高光变化,模拟光线在玻璃表面移动的效果,增强了界面的生动性和物理隐喻。统一的全平台体验: “液体玻璃”将贯穿iPhone、iPad、Mac、Apple Watch乃至CarPlay,旨在创造一个无缝且高度统一的跨设备视觉体验。

优点: 更强的沉浸感和愉悦感: 流动且富有表现力的界面能让用户体验更加生动和有趣。锁屏上的时间会根据壁纸图片智能调整布*,空间场景壁纸也会在用户移动手机时呈现3D效果。

增强的上下文感知: 半透明的设计让用户在*作当前任务时,仍能隐约感知到背景层级的内容,提升了多任务处理时的空间感。

潜在争议与挑战: 可读性下降: 有部分早期测试和评论指出,在某些浅色或复杂的背景下,半透明元素上的文字和图标可能会变得难以辨认,影响阅读效率。

视觉干扰: 对于追求简洁和高效率的用户来说,过于动态和“花哨”的界面可能会分散注意力,甚至被一些用户认为“丑”或“杂乱”。苹果为此保留了在“辅助功能”中“减少透明度”的选项来应对此问题。

有传言称,苹果正在研发代号为“Glasswing”的20周年纪念版iPhone(预计2027年),其特点是拥有曲面玻璃边缘、极窄边框甚至无开孔的全面屏。届时,“液体玻璃”的UI将与这种全玻璃的硬件设计在美学上达到完美统一。

 在业界普遍认为苹果在生成式AI领域进展相对缓慢的背景下,推出一场惊艳的视觉革命,可以有力地展示其在图形处理、自研芯片(Apple Silicon)算力以及软硬件结合上的深厚实力,从而在一定程度上转移公众对AI功能落后的关注。

苹果在设计领域向来是潮流的引领者。正如当年的扁平化设计一样,“液体玻璃”所倡导的拟物与扁平结合的“玻璃拟态”(Glassmorphism)风格,可能会被整个行业的设计师和开发者广泛采纳。

HTML代码:

                 

     

All Of Me Nao

       

         

           

     

                                                          Home                                               New                                               Wifi                                               Library            

 

     

                                            Search      

 

   

CSS代码:

:root { --lg-bg-color: rgba(255, 255, 255, 0.25); --lg-highlight: rgba(255, 255, 255, 0.75); --lg-text: #ffffff; --lg-hover-glow: rgba(255, 255, 255, 0.4); --lg-red: #fb4268; --lg-grey: #5b5b5b; }

/* ========== BASE LAYOUT ========== */ body { margin: 0; padding: 2rem 0; min-height: calc(100vh - 4rem); display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: sans-serif; background: url("https://images.unsplash.com/photo-1588943211346-0908a1fb0b01?crop=entropycs=srgbfm=jpgixid=M3wzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE3NDk1MzU4MDV8ixlib=rb-4.1.0q=85") center/cover; animation: bg-move 5s ease-in-out infinite alternate; }

@keyframes bg-move { from { background-position: center center; } to { background-position: center top; } }

/* ========== CONTAINER ========== */ .container { display: flex; flex-direction: column; align-items: center; justify-content: center; }

.container--inline { flex-direction: row; }

/* ========== GLASS CONTAINER ========== */ .glass-container { position: relative; display: flex; font-weight: 600; color: var(--lg-text); cursor: pointer; background: transparent; border-radius: 2rem; overflow: hidden; box-shadow:6px 6px rgba(0, 0, 0, 0.2),0 20px rgba(0, 0, 0, 0.1); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 2.2); }

.glass-container--rounded { border-radius: 5rem; margin: 0.5rem; fill: var(--lg-grey); }

.glass-container--small { margin: 5rem1rem; border-radius: 5rem; text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.25); }

.glass-container--large { min-width: 32rem; }

.glass-container--medium { min-width: 25rem; }

.glass-container svg { fill: white; }

/* ========== GLASS ITEM ========== */ .glass-item { display: flex; flex-direction: column; align-items: center; justify-content: space-between; border-radius: 1rem; color: var(--lg-grey); transition: color 0.3s ease; text-align: center; }

.glass-item svg { fill: var(--lg-grey); height: 50px; margin-bottom: 0.25rem; }

.glass-item--active { background: rgba(0, 0, 0, 0.25); color: var(--lg-red); margin:-0.5rem; padding: 0.25rem 1.95rem; border-radius: 5rem; }

.glass-item--active svg { fill: var(--lg-red); }

.player { display: flex; align-items: center; width: 100%; flex: 1 1 auto; justify-content: space-between; }

.player__thumb { display: flex; align-items: center; justify-content: center; margin-left: 0.5rem; }

.player__img { width: 5rem; height: auto; margin: 0.25rem 0; border-radius: 0.5rem; }

.player__legend { display: flex; flex-direction: column; margin:1rem; color: black; }

.player__legend__title { font-size: 1rem; margin: 0; }

.player__legend__sub-title { font-size: 1rem; margin: 0; opacity: 0.45; }

.player__controls { margin-right: -1rem; display: flex; align-items: center; justify-content: center; }

.player__controls__play { margin-right: 1rem; display: flex; }

.player__controls__ff { display: flex; }

/* ========== GLASS LAYERS ========== */ .glass-filter { position: absolute; inset: 0; z-index: 0; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); filter: url(#lg-dist) saturate(150%); isolation: isolate; }

.glass-overlay { position: absolute; inset: 0; z-index: 1; background: var(--lg-bg-color); }

.glass-specular { position: absolute; inset: 0; z-index: 2; border-radius: inherit; overflow: hidden; box-shadow: inset 1px 1pxvar(--lg-highlight), inset0 5px var(--lg-highlight); }

.glass-content { position: relative; z-index: 3; display: flex; align-items: center; gap: 20px; padding: 1rem 1.5rem 0.9rem; }

.glass-content--inline { padding: 0.25rem 2rem 0.25rem 0.75rem; flex: 1 1 auto; justify-content: space-between; }

/* ========== ICONS AND IMAGES ========== */ .glass-content a { display: inline-block; position: relative; padding: 1px; border-radius: 1.2rem; }

.glass-content a img { display: block; width: 75px; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 2.2); }

.glass-content a img:hover { transform: scale(0.95); }

附加react.JS实现玻璃液体效果:https://codesandbox.io/p/github/JaskoKongen/DemoLiquidGlassReact/main

网友热评: 1、Liquid Glass 应该超出 CSS 的能力。但这不会阻止人们编写 WebGL 着色器。

2、从现在起:浏览器制造商可能正忙于在 CSS 中添加类似 Liquid Glass 的效果。

原文:https://www.jdon.com/79967.html



【本文地址】 转载请注明 

最新文章

推荐文章

CopyRight 2018-2019 办公设备维修网 版权所有