用css制作点点点动画

497 阅读1分钟
//...的动态效果
@keyframes dotdotdot {
    33% {
        transform: translateY(-2em);
    }
    66% {
        transform: translateY(-1em);
    }
}
.dot-animation {
    display: inline-block;
    height: 1em;
    line-height: 1;
    text-align: left;
    vertical-align: -0.25ex;
    overflow: hidden;
}
.dot-animation::before {
    display: block;
    content: '...\A..\A.';
    white-space: pre-wrap;
    animation: dotdotdot 1s infinite step-start both;
}