效果:省略号从一个点到三个点不停变化
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
dot {
display: inline-block;
height: 1em;
line-height: 1;
text-align: left;
vertical-align: -.25em;
overflow: hidden;
}
dot::before {
display: block;
content: '...\A..\A.';
white-space: pre-wrap;
animation: dot 3s infinite step-start both;
}
@keyframes dot {
33% {
transform: translateY(-2em)
}
66% {
transform: translateY(-1em)
}
}
</style>
</head>
<body>
正在加载中<dot>...</dot>
</body>
</html>
版权声明:本文为BetterGG原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。