显示滚动显示彼此之后的动画

时间:2016-08-02 12:43:35

标签: javascript jquery scrollreveal.js

我正在使用此模板:https://startbootstrap.com/template-overviews/creative/与插件jQuery Scroll Reveal

如果您查看此页面:https://blackrockdigital.github.io/startbootstrap-creative/#services

动画(Dimond,纸飞机,报纸和心脏)相互加载。当数字一个完成等时,图标数字2开始动画。

当我尝试做同样的事情时,所有动画都会同时加载。

JavaScript(刚刚将.sr-step添加到模板中)

// Initialize and Configure Scroll Reveal Animation
window.sr = ScrollReveal();
sr.reveal('.sr-icons', {
    duration: 600,
    scale: 0.3,
    distance: '0px'
}, 200);
sr.reveal('.sr-button', {
    duration: 1000,
    delay: 200
});
sr.reveal('.sr-step', {
    duration: 600,
    delay: 200
});
sr.reveal('.sr-contact', {
    duration: 600,
    scale: 0.3,
    distance: '0px'
}, 300);

这是我的HTML

                <div class="row">
                    <div class="col-lg-3 col-md-6 sr-step">
                            <h3 class="step-number">01</h3>
                           <div class="step-text"><p>Text text text text.</p>
                       </div>
                   </div>
                   <div class="col-lg-3 col-md-6 sr-step">
                        <h3 class="step-number">02</h3>
                       <div class="step-text">Text text text text.</div>
               </div>
                    <div class="col-lg-3 col-md-6 sr-step">
                        <h3 class="step-number">03</h3>
                       <div class="step-text">Text text text text.</div>
               </div>
               <div class="col-lg-3 col-md-6 sr-step">
                    <h3 class="step-number">04</h3>
                 <div class="step-text">Text text text text.</div>
         </div>
     </div>

2 个答案:

答案 0 :(得分:0)

发现\w+(?:\.\w+)*\[(?:\s*,?\s*(?<res>\w+(?:\[(?>[^][]+|(?<o>\[)|(?<-o>]))*(?(o)(?!))])?))*

的延迟
200

答案 1 :(得分:0)

在定序器检修期间,很明显interval参数的可选性质不必要地造成混淆。现在,它与所有其他选项一起存在。

// v3
window.sr = new ScrollReveal();
sr.reveal('.tile', { reset: true }, 16);

// v4
ScrollReveal().reveal('.tile', { reset: true, interval: 16 });

source