Punctuation loading “animation”, javascript?

后端 未结 4 1431
甜味超标
甜味超标 2021-02-19 17:52

I\'m looking for a good way to display some punctuation loading \"animation\".

What I want is something like this:

This will display at second 1: \"Waiti         


        
4条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-19 18:26

    This can be very easy:

    HTML

    
    

    JQuery

    setInterval(function() {
        var th = $('.dots');
        if(th.text().length < 5){
            th.text(th.text()+".");
        }else{
            th.text("");
        }
    }, 500);
    

    Demo

提交回复
热议问题