Example: https://codepen.io/lukaszkups/pen/NQjeVN
You can animate css content
too!
// HTML
Loading
// CSS (nested SASS)
p
span
&:before
animation: dots 2s linear infinite
content: ''
@keyframes dots
0%, 20%
content: '.'
40%
content: '..'
60%
content: '...'
90%, 100%
content: ''