How to create a frosted glass effect using CSS?

后端 未结 7 1173
独厮守ぢ
独厮守ぢ 2020-12-01 06:12

I\'d like to create a div that is fixed in one position and make it translucent - making the contents behind it partially visible and blurred. The style I\'m lo

7条回答
  •  天涯浪人
    2020-12-01 06:18

    Some browsers support the new CSS property backdrop-filter. This property enables you to add a "frosted glass-like" effect on an element without using the pseudo classes.

    Example:

    element {
        background: rgba(255, 255, 255, .5);
        backdrop-filter: blur(10px);
    }
    

    https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter

提交回复
热议问题