xg-project-library/html/1.html

54 lines
1.4 KiB
HTML
Raw Normal View History

2024-11-15 03:24:03 +00:00
<!DOCTYPE html>
<html lang="en">
2024-11-25 03:46:48 +00:00
<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>
.box {
width: 40px;
height: 20px;
border-radius: 40px;
border: 1px solid #000;
position: relative;
}
.dot {
width: 23px;
height: 15px;
border-radius: 40px;
background-color: aqua;
position: absolute;
top: 50%;
transform: translateY(-50%);
left: 2px;
animation: show 3s forwards;
}
@keyframes show {
0% {
left: 2px;
}
10% {
left: 2px;
width: 30px;
}
30% {
left: 20px;
width: 30px;
}
100% {
left: 20px;
width: 23px;
}
}
</style>
</head>
<body>
<div class="box">
<div class="dot"></div>
</div>
</body>
</html>