简体   繁体   English

互相显示滚动显示动画

[英]Display Scroll Reveal Animation after each other

I'am using this template: https://startbootstrap.com/template-overviews/creative/ with the plugin jQuery Scroll Reveal 我正在使用此模板: https ://startbootstrap.com/template-overviews/creative/和插件jQuery Scroll Reveal

If you look at this page: https://blackrockdigital.github.io/startbootstrap-creative/#services 如果您查看此页面: https : //blackrockdigital.github.io/startbootstrap-creative/#services

The animations (Dimond, paper plane, newspaper and the heart) are loaded after each other. 动画(Dimond,纸飞机,报纸和心脏)相互加载。 Icon numer 2 starts to animate when numer one are finished etc. 当数字1完成后,图标数字2开始动画。

When I'am trying to do the same thing are all animation loaded at the same time. 当我尝试执行相同的操作时,将同时加载所有动画。

JavaScript (just added .sr-step to the template) 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);

And this is my html 这是我的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>

Found the delay on 200 发现延迟200

sr.reveal('.sr-icons', {
    duration: 600,
    scale: 0.3,
    distance: '0px'
}, 200);

During the sequencer overhaul, it became clear that optional nature of the interval parameter was unnecessarily confusing. 在定序器检修期间,很明显, interval参数的可选性质不必要地造成混淆。 It now lives with all the other options. 现在,它与所有其他选项一起存在。

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

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

source 资源

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM