效果图
.mp4%22%2C%22size%22%3A335382%2C%22percent%22%3A100%2C%22taskId%22%3A%22D8ciKN1MBYAE%22%2C%22margin%22%3Atrue%2C%22id%22%3A%228CFn1%22%2C%22videoId%22%3A%22inputs%2Fprod%2Fyuque%2F2020%2F338969%2Fmp4%2F1606374511358-0955bbd3-7d3c-435a-9826-ccd124bfbd01.mp4%22%2C%22card%22%3A%22video%22%7D#8CFn1)
代码实现
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
}
.miusicFa {
padding: 0;
list-style: none;
width: 104px;
height: 104px;
display: flex;
justify-content: center;
align-items: center;
background: #0086FF;
border-radius: 50%;
}
li {
width: 0.08rem;
height: 0.2rem;
margin-left: 0.06rem;
border-radius: 0.04rem;
background: #fff;
}
li:first-child {
margin-left: 0;
}
.m1 {
animation: 0.8s 0.1s living linear infinite backwards normal;
animation-delay: -1.1s;
}
.m2 {
animation: 0.8s 0.3s living linear infinite backwards normal;
animation-delay: -1.3s;
}
.m3 {
animation: 0.8s 0.6s living linear infinite backwards normal;
animation-delay: -1.6s;
}
@keyframes living {
0% {
transform: scaleY(0.5);
transform-origin: 0 .21rem;
}
20% {
transform: scaleY(1);
transform-origin: 0 .21rem;
}
40% {
transform: scaleY(1.5);
transform-origin: 0 .21rem;
}
60% {
transform: scaleY(2);
transform-origin: 0 .21rem;
}
80% {
transform: scaleY(1.5);
transform-origin: 0 .21rem;
}
100% {
transform: scaleY(1);
transform-origin: 0 .21rem;
}
}
</style>
<script>
!function (global) {
var window = global || this,
width = 720 / 2,
docEl = window.document.documentElement,
dpr = window.devicePixelRatio || 1,
resizeEvt = 'resize',
resizeCall = (function () {
var clientWidth = docEl.clientWidth;
if (!clientWidth) {
docEl.style.fontSize = 100 + 'px';
} else {
clientWidth < 720 ? docEl.style.fontSize = 50 * (clientWidth / width) + 'px' : docEl.style.fontSize = '75px';
}
return arguments.callee;
})();
dpr = dpr >= 3 ? 3 : dpr >= 2 ? 2 : 1;
docEl.setAttribute('data-dpr', dpr);
window.addEventListener && window.addEventListener(resizeEvt, resizeCall, false);
}(this);
</script>
</head>
<body>
<ul class="miusicFa">
<li class="m1"></li>
<li class="m2"></li>
<li class="m3"></li>
</ul>
</body>
</html>