JS实现字符点点loading效果
JS实现字符点点loading效果
<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; /* 也可以是white-space: pre */ animation: dot 1s infinite step-start both; } @keyframes dot { 33% { transform: translateY(-2em); } 66% { transform: translateY(-1em); } } </style> 提交中<dot>...</dot>
ref: https://www.zhangxinxu.com/wordpress/2016/11/css-content-pre-animation-character-loading/