實(shí)現(xiàn)效果
實(shí)現(xiàn)代碼文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-811515.html
/* 關(guān)鍵屬性 */
background-color: rgba(255, 255, 255, 0.4);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
完整代碼文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-811515.html
<style>
/* 遮罩層 */
.mo-mask {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
width: 100%;
height: 100%;
background-color: #1e80ff;
}
.mo-dialog {
border-radius: 16px;
height: 400px;
width: 600px;
margin: 100px auto;
/* 關(guān)鍵屬性 */
background-color: rgba(255, 255, 255, 0.4);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
}
</style>
<div class="mo-mask">
<div class="mo-dialog"></div>
</div>
參考文章
- 前端筆記 - 【CSS】 - filter 于 backdrop-filter
到了這里,關(guān)于CSS:backdrop-filter實(shí)現(xiàn)毛玻璃的效果的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!