Home >Web Front-end >CSS Tutorial >A brief discussion on how to achieve frosted glass effect with css
This article will let you know how to use css to achieve the frosted glass effect? It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.
I saw the frosted glass effect of a floating menu on Apple’s official website
I was fascinated by this effect I was attracted, and after digging into the source code, I found that this effect can be achieved through only two CSS properties.
Apple website address https://www.apple.com.cn/macos/big-sur/. If you are interested, you can check it out. There are some more interesting special effects on it. I have to say Apple’s page The experience is really well done, you can study it if you are interested.
background: rgba(29,29,31,0.72);
Add a background color with a transparency of 0.72
backdrop-filter: saturate(180%) blur(20px);
## are added here. For more programming-related knowledge, please visit:backdrop-filter Add a filter behind the element, Instead of elements, two filters
saturate
andblur
Programming Video! !
The above is the detailed content of A brief discussion on how to achieve frosted glass effect with css. For more information, please follow other related articles on the PHP Chinese website!