background var--heo-card-bg;设置成毛玻璃
可以使用CSS中的backdrop-filter属性来实现毛玻璃效果。具体实现步骤如下:
-
将background属性设置为透明色,以便毛玻璃效果能够展现出来。
-
设置backdrop-filter属性为blur(模糊值),可以控制毛玻璃的程度。
-
为了兼容性,可以添加-webkit-前缀。
示例代码:
.card { background: transparent; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); /* 兼容性 */ }
原文地址: https://www.cveoy.top/t/topic/cZxl 著作权归作者所有。请勿转载和采集!