Open goldEli opened 4 years ago
<!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>
.box{
width: 100px;
height: 100px;
display: flex;
flex-direction: row;
justify-content: space-around;
align-items: center;
}
.box div:nth-child(1){
animation-delay: 0s;
}
.box div:nth-child(2){
animation-delay: 0.25s;
}
.box div:nth-child(3){
animation-delay: 0.4s;
}
.item{
width: 20px;
height: 20px;
background-color: gray;
border-radius: 50%;
animation-name: move;
animation-duration: 0.6s;
animation-iteration-count:infinite;
animation-direction:alternate;
}
@keyframes move {
0% {transform: translateY(-0px);opacity: 1;}
100% {transform: translateY(-16px);opacity: 0.2;}
}
</style>
</head>
<body>
<div class="box">
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
</div>
<script>