效果
直接上代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
height:100vh;
overflow: hidden;
display: flex;
background-color: aliceblue;
}
.glass{
height: 200px;
box-shadow: inset 0 0 150px #07b1ee;
margin: auto;
width: 200px;
position: relative;
overflow: hidden;
clip-path: polygon(
0 0,
100% 0,
170px 100%,
30px 100%
);
}
.glass::before{
content: '';
width: 200%;
height: 200%;
background-color: #fff;
position: absolute;
top: -150%;
left: -50%;
animation: rotate 2s linear infinite;
border-radius: 20% 20% 20% 30%;
}
@keyframes rotate {
100% {
transform: rotate(360deg);
}
}
</style>
</head>
<body>
<div class="glass"></div>
</body>
</html>