<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
body {
background-color: #232833;
}
.box {
width: 100px;
height: 100px;
margin: 100px auto;
position: relative;
}
.round {
width: 100px;
height: 100px;
border-radius: 50%;
background: #ffffff;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
top: 50%;
left: 50%;
z-index: 0;
cursor: pointer;
}
.round img {
padding: 0 0 0 13px;
width: auto;
}
.round::before {
content: '';
display: block;
position: absolute;
width: 100%;
height: 100%;
opacity: 0.5;
background: #ffffff;
border-radius: 50%;
z-index: -1;
animation: myRound 2s infinite cubic-bezier(0.3, -0.3, 1, 1);
}
@keyframes myRound {
0% {
transform: scale(1);
opacity: 0.5;
}
70% {
transform: scale(1);
opacity: 0.5;
}
100% {
transform: scale(1.8);
opacity: 0.1;
}
}
</style>
</head>
<body>
<div class="round">
<img src="./round_icon.png" alt="">
</div>
</body>
</html>
演示效果: