<!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>
* {
padding: 0;
margin: 0;
}
.da {
width: 888px;
height: 444px;
border-bottom: 2px solid red;
margin: 30px auto;
position: relative;
}
.xiao {
width: 443px;
height: 444px;
border-right: 2px solid red;
}
.qiu {
width: 50px;
height: 50px;
background-color: red;
border-radius: 50px;
margin: auto;
left: 0;
right: 0;
top: 0;
position: absolute;
animation: run 2s infinite alternate;
}
@keyframes run {
from {
top: 0px;
}
to {
top: 396px;
}
}
</style>
</head>
<body>
<div class="da">
<div class="xiao"></div>
<div class="qiu"></div>
</div>
</body>
</html>