<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
@keyframes el {
0% {
transform: translateX(0px);
}
50% {
transform: translateX(25px);
}
100% {
transform: translateX(0px);
}
}
@keyframes er {
0% {
transform: translateX(0px);
}
50% {
transform: translateX(25px);
}
100% {
transform: translateX(0px);
}
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.item {
width: 200px;
height: 200px;
background-color: #59488b;
margin: 0 auto;
position: relative;
overflow: hidden;
}
.bigel {
width: 40px;
height: 40px;
background-color: white;
border-radius: 50%;
margin-top: 80px;
margin-left: 40px;
float: left;
position: relative;
}
.biger {
width: 40px;
height: 40px;
background-color: white;
border-radius: 50%;
margin-top: 80px;
margin-right: 40px;
float: right;
position: relative;
}
.small {
width: 15px;
height: 15px;
border-radius: 50%;
background-color: #59488b;
position: absolute;
top: 16px;
left: 0;
animation: el 2s linear infinite;
}
.smalr {
width: 15px;
height: 15px;
border-radius: 50%;
background-color: #59488b;
position: absolute;
top: 16px;
right: 25px;
animation: er 2s linear infinite;
}
</style>
</head>
<body>
<div class="item">
<div class="bigel">
<div class="small"></div>
</div>
<div class="biger">
<div class="smalr"></div>
</div>
</div>
</body>
</html>
12-09
727