<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
.box1{
width: 10px;
height: 10px;
border-radius: 50%;
border: 1px solid red;
background-color: greenyellow;
transition: 1s;
animation-name: myone;
animation-duration: 5s;
animation-timing-function: linear;
animation-delay: 2s;
animation-iteration-count: infinite;
animation-direction: alternate;
animation-play-state: running;
position: relative;
top: -210px;
left: 20px;
}
@keyframes myone {
0% {
left: 0px;
top: 0px;
}
50%{
left: 0px;
top: 100px;
}
100%{
left: 50px;
top: 100px;
}
}
}
.box2{
width: 10px;
height: 10px;
border-radius: 50%;
border: 1px solid red;
background-color: red;
transition: 1s;
animation-name: mytwo;
animation-duration: 5s;
animation-timing-function: linear;
animation-delay: 2s;
animation-iteration-count: infinite;
animation-direction: alternate;
animation-play-state: running;
}
@keyframes mytwo {
0% {
left: 200px;
top: 0px;
}
50%{
left: 200px;
top: 100px;
}
100%{
left: 50px;
top: 100px;
}
}
}
.box3{
width: 100px;
height: 100px;
background-color: red;
border-radius: 50%;
border: 1px solid red;
}
</style>
</head>
<body>
<div class="box1"></div>
<div class="box2"></div>
<span style="font-size: 100px; position: fixed;">L</span>
<span style="font-size: 100px; position: fixed; left: 200px;">b</span>
<span style="font-size: 100px; position: fixed; left: 400px;">h</span>
</body>
</html>