backdrop-filter test
by Ting-Yuan Chang
HTML
<div class='modal'>
<div class='mask'>
Hello theres
</div>
</div>
CSS
html, body {
margin: 0 auto;
background: url('https://i.imgur.com/xRxFRSY.jpg');
}
.modal {
position: fixed;
transform: translate(-50%, -50%);
top: 50%;
left: 50%;
width: 200px;
height: 200px;
border: 1px black solid;
border-radius: 50px;
}
.mask {
position: relative;
width: 200px;
height: 200px;
line-height: 200px;
vertical-align: middle;
text-align: center;
font-size: 30px;
color: white;
-webkit-backdrop-filter: blur(5px);
backdrop-filter: blur(5px);
border-radius: 50px;
}
JavaScript
/*
Please use Safari or Chrome with --enable-experimental-web-platform-features
*/