A brief discussion on how to achieve frosted glass effect with css

青灯夜游
Release: 2021-05-08 10:30:44
forward
3412 people have browsed it

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.

A brief discussion on how to achieve frosted glass effect with css

I saw the frosted glass effect of a floating menu on Apple’s official website

A brief discussion on how to achieve frosted glass effect with css

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.

Key css attributes

background: rgba(29,29,31,0.72);
Copy after login

Add a background color with a transparency of 0.72

backdrop-filter: saturate(180%) blur(20px);
Copy after login

backdrop-filter Add a filter behind the element, Instead of elements, two filters saturate and blur

## are added here. For more programming-related knowledge, please visit:

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!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template