页面滚动元素进入完整html,jQuery页面滚动元素进入视口发生动画特效插件

jQuery AniView

A jQuery plugin that works in harmony with animate.css in order to enable animations only when content comes into view.

jQuery AniView is a minimal (~1KB) jQuery plugin that allows you to add animations to your

webpages with nothing more than a class identifier and a single data attribute. There are also a couple of optional... options.

Scroll down to see how it works!

Initialisation:

$('.aniview').AniView();

Options:

var options = {

animateThreshold: 100,

scrollPollInterval: 20

}

$('.aniview').AniView(options);

OptionTypeDescriptionDefault

animateThresholdint+ve numbers delay the animation sequence until the specified number pixels have come into view. -ve numbers will trigger the animation sequence prior to the element coming into view.0

scrollPollIntervalintThe frequency at which the user scrolling is 'polled' i.e. tested. This is in milliseconds (ms) and is an extension jQuery's in-built 'scroll' event/handler.20

Markup:

As you scroll down the page, each animation is triggered when the threshold is met.

i.e. when it comes into view by way of the bottom of the user's screen (viewport).

Since it uses the freakin awesome animate.css -

it supports all of the same animations that it does.

All you have to do is simply declare what you want to use via the av-animation attribute.

You could even set up some custom animation classes so that animations occur in a specific order, e.g:

.fast {

-vendor-animation-duration: 1s;

-vendor-animation-delay: 0s;

}

.slow {

-vendor-animation-duration: 3s;

-vendor-animation-delay: 1s;

}

.reallyslow {

-vendor-animation-duration: 6s;

-vendor-animation-delay: 3s;

}

94e306b0da459ddf9dd7e5c1350e90f6.png

94e306b0da459ddf9dd7e5c1350e90f6.png

94e306b0da459ddf9dd7e5c1350e90f6.png

94e306b0da459ddf9dd7e5c1350e90f6.png

That should be enough to get you up and running! Check it out!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值