Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
纯CSS给一行文字后面加上简单的loading效果
.loading-anim {
font-size: 64px;
display: inline-block;
}
.loading-anim:after {
content: "\2026";
font-family: serif;
overflow: hidden;
display: inline-block;
vertical-align: bottom;
animation: loading 1.2s infinite;
}
@keyframes loading-anim {
0%, 25% {
width: 0;
}
26%, 50% {
width: 0.333em;
}
51%, 75% {
width: 0.666em;
}
76%, 100% {
width: 1em;
}
}
@yongdi

This comment has been minimized.

Copy link

yongdi commented Mar 16, 2017

@Keyframes loading-anim

这里写错了, 应该是loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.