Punctuation loading “animation”, javascript?

后端 未结 8 2371
生来不讨喜
生来不讨喜 2021-02-19 17:54

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         


        
8条回答
  •  忘掉有多难
    2021-02-19 18:32

    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

提交回复
热议问题