admin管理员组文章数量:1278984
I'm using AOS library (css & js) it helps me to create animation triggered everytime user scrolling down the page. I have an issue that the top element of my page only run once because AOS only make it triggered when scroll down. I want all my animation run evrytime user scrolling down and up. How can I make it ? and this is a sample of my problem.
JSFiddle
for look scrolling up do not give any effect please put
<div class="alert kotak" data-aos="bounce">
in
<div class="wrapper">
tag
I'm using AOS library (css & js) it helps me to create animation triggered everytime user scrolling down the page. I have an issue that the top element of my page only run once because AOS only make it triggered when scroll down. I want all my animation run evrytime user scrolling down and up. How can I make it ? and this is a sample of my problem.
JSFiddle
for look scrolling up do not give any effect please put
<div class="alert kotak" data-aos="bounce">
in
<div class="wrapper">
tag
Share Improve this question edited Jan 12, 2017 at 4:06 azalikaayla asked Jan 12, 2017 at 4:01 azalikaaylaazalikaayla 611 gold badge1 silver badge5 bronze badges2 Answers
Reset to default 5I had the same question, i used attributes on the container:
data-aos-mirror="true"
Or pass it as settings in the init object.
AOS.init();
// You can also pass an optional settings object
// below listed default settings
AOS.init({
// Global settings:
debounceDelay: 50, // the delay on debounce used while resizing window (advanced)
// Settings that can be overridden on per-element basis, by `data-aos-*` attributes:
once: false, // whether animation should happen only once - while scrolling down
mirror: true, // whether elements should animate out while scrolling past them
});
Hope it helps for newers as me.
You need to add the class name of "aos-item", here is an example that animates re-animates every time you scroll past it.
<div class="well hidden-sm hidden-xs aos-item" data-aos="zoom-out" data-aos-anchor-placement="top-center">
本文标签: javascriptHow to trigger animation on scroll up with AOSStack Overflow
版权声明:本文标题:javascript - How to trigger animation on scroll up with AOS - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741289992a2370491.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论