Created
June 4, 2015 09:19
-
-
Save xieranmaya/5467fcc6dbd7243ac6be to your computer and use it in GitHub Desktop.
纯CSS给一行文字后面加上简单的loading效果
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Keyframes loading-anim
这里写错了, 应该是loading