Punctuation loading “animation”, javascript?

后端 未结 8 2295
生来不讨喜
生来不讨喜 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-19 18:19

    try this function: i'v put an example here http://jsfiddle.net/XFd39/

    var i=0;   
    function f() {
    if(i<=4)
     $('#a').append(".");
    i++;
    if(i==4){
        $('#a').html("");
        i=0;
    }
    setTimeout(f,500);
    }
    f();
    

提交回复
热议问题