HTML部分
<div class="loading-container"> <span class="loading-line"></span> <span class="loading-line"></span> <span class="loading-line"></span> </div>
CSS部分
<style>
loading-container {
padding: 60px;
display: flex;
align-items: center;
height: 40px;
}
.loading-line {
display: inline-block;
width: 8px;
height: 20px;
background-color: dodgerblue;
margin: 0 4px;
box-shadow: 5px 5px 3px #a495e0db;
}
.loading-line:first-child {
animation: higher 1.2s ease-out infinite alternate;
}
.loading-line:nth-child(2) {
animation: higher 1.2s ease-out infinite .4s alternate;
}
.loading-line:nth-child(3) {
animation: higher 1.2s ease-out infinite .8s alternate;
}
@keyframes higher {
from {
height: 20px;
}
to {
height: 40px;
}
}
</style>
您可以选择以下一种方式打赏本站
支付宝扫一扫打赏