【发布时间】:2019-08-08 05:10:05
【问题描述】:
我正在使用这个模板:https://startbootstrap.com/template-overviews/creative/ 和插件 jQuery Scroll Reveal
如果你看这个页面:https://blackrockdigital.github.io/startbootstrap-creative/#services
动画(钻石、纸飞机、报纸和心脏)依次加载。当数字 1 完成等时,图标 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>
【问题讨论】:
标签: javascript jquery scrollreveal.js