利用JS实现滚动触发动画插件scrollreveal特效



如需定制开发(网站开发、二次开发)在线咨询,请点击>> QQ:753511799

132 526 176



特效描述:利用JS实现 滚动触发动画 scrollreveal。利用JS实现滚动触发动画插件scrollreveal特效

代码结构

1. 引入CSS

<link rel="stylesheet" href="css/style.css">

2. 引入JS

<script src="js/scrollReveal.min.js"></script>

3. HTML代码

  <h1 data-scroll-reveal="enter from the top over 1.5s">scrollR eveal.js</h1>
  <p data-scroll-reveal="enter bottom but wait 1s">Declarative on-scroll reveal animations.</p>
  <p data-scroll-reveal="enter bottom but wait 1.3s">An open-source project by <a class="inline" href="http://51qianduan.com/" title="Julian Lloyd on Twitter">ChinaZ</a></p>
  <div class="column-container clearfix">
    <!-- col 1 -->
    <div class="column">
      <div class="block block-1x block-slate" data-scroll-reveal="enter top over 3s after 0.5s"></div>
      <div class="block block-2x block-mango" data-scroll-reveal="enter right after 0.5s"></div>
      <div class="block block-1x block-kiwi" data-scroll-reveal="enter bottom over 1s and move 300px after 0.3s"></div>
      <div class="block block-3x block-blueberry" data-scroll-reveal="enter top over 0.5s and move 200px"></div>
      <div class="block block-2x block-raspberry" data-scroll-reveal="enter bottom over 1s and move 100px"></div>
      <div class="block block-1x block-grape" data-scroll-reveal="enter top"></div>
    </div>
    <!-- col 2 -->
    <div class="column">
      <div class="block block-3x block-kiwi" data-scroll-reveal="enter bottom over 1s and move 300px after 0.3s"></div>
      <div class="block block-1x block-orange" data-scroll-reveal="enter left"></div>
      <div class="block block-2x block-grape" data-scroll-reveal="enter top"></div>
      <div class="block block-1x block-orange" data-scroll-reveal="enter left"></div>
      <div class="block block-1x block-grape" data-scroll-reveal="enter top"></div>
      <div class="block block-2x block-slate" data-scroll-reveal="enter top over 3s after 0.5s"></div>
    </div>
    <!-- col 3 -->
    <div class="column">
      <div class="block block-2x block-raspberry" data-scroll-reveal="enter bottom over 1s and move 100px"></div>
      <div class="block block-1x block-blueberry" data-scroll-reveal="enter top over 0.5s and move 200px"></div>
      <div class="block block-2x block-slate" data-scroll-reveal="enter top over 3s after 0.5s"></div>
      <div class="block block-1x block-mango" data-scroll-reveal="enter right after 0.5s"></div>
      <div class="block block-1x block-slate" data-scroll-reveal="enter top over 3s after 0.5s"></div>
      <div class="block block-3x block-orange" data-scroll-reveal="enter left"></div>
    </div>
    <!-- col 4 -->
    <div class="column">
      <div class="block block-1x block-orange" data-scroll-reveal="enter left"></div>
      <div class="block block-2x block-grape" data-scroll-reveal="enter top"></div>
      <div class="block block-3x block-raspberry" data-scroll-reveal="enter bottom over 1s and move 100px"></div>
      <div class="block block-1x block-blueberry" data-scroll-reveal="enter top over 0.5s and move 200px"></div>
      <div class="block block-2x block-kiwi" data-scroll-reveal="enter bottom over 1s and move 300px after 0.3s"></div>
      <div class="block block-1x block-mango" data-scroll-reveal="enter right after 0.5s"></div>
    </div>
    <!-- col 5 -->
    <div class="column">
      <div class="block block-3x block-mango" data-scroll-reveal="enter right after 0.5s"></div>
      <div class="block block-1x block-kiwi" data-scroll-reveal="enter bottom over 1s and move 300px after 0.3s"></div>
      <div class="block block-2x block-orange" data-scroll-reveal="enter left"></div>
      <div class="block block-1x block-grape" data-scroll-reveal="enter top"></div>
      <div class="block block-1x block-slate" data-scroll-reveal="enter top over 3s after 0.5s"></div>
      <div class="block block-2x block-raspberry" data-scroll-reveal="enter bottom over 1s and move 100px"></div>
    </div>
    <!-- col 6 -->
    <div class="column">
      <div class="block block-1x block-kiwi" data-scroll-reveal="enter bottom over 1s and move 300px after 0.3s"></div>
      <div class="block block-3x block-slate" data-scroll-reveal="enter top over 3s after 0.5s"></div>
      <div class="block block-1x block-blueberry" data-scroll-reveal="enter top over 0.5s and move 200px"></div>
      <div class="block block-3x block-kiwi" data-scroll-reveal="enter bottom over 1s and move 300px after 0.3s"></div>
      <div class="block block-1x block-orange" data-scroll-reveal="enter left"></div>
      <div class="block block-1x block-blueberry" data-scroll-reveal="enter top over 0.5s and move 200px"></div>
    </div>
    <!-- col 7 -->
    <div class="column">
      <div class="block block-2x block-blueberry" data-scroll-reveal="enter top over 0.5s and move 200px"></div>
      <div class="block block-1x block-raspberry" data-scroll-reveal="enter bottom over 1s and move 100px"></div>
      <div class="block block-1x block-mango" data-scroll-reveal="enter right after 0.5s"></div>
      <div class="block block-3x block-raspberry" data-scroll-reveal="enter bottom over 1s and move 100px"></div>
      <div class="block block-2x block-mango" data-scroll-reveal="enter right after 0.5s"></div>
      <div class="block block-1x block-slate" data-scroll-reveal="enter top over 3s after 0.5s"></div>
    </div>
    <!-- col 8 -->
    <div class="column">
      <div class="block block-1x block-grape" data-scroll-reveal="enter top"></div>
      <div class="block block-2x block-orange" data-scroll-reveal="enter left"></div>
      <div class="block block-1x block-grape" data-scroll-reveal="enter top"></div>
      <div class="block block-3x block-slate" data-scroll-reveal="enter top over 3s after 0.5s"></div>
      <div class="block block-1x block-blueberry" data-scroll-reveal="enter top over 0.5s and move 200px"></div>
      <div class="block block-2x block-kiwi" data-scroll-reveal="enter bottom over 1s and move 300px after 0.3s"></div>
    </div>
  </div>
  <p data-scroll-reveal="after 1.3s enter bottom over 1s"><small class="floater">(Have you tried scrolling back up?)</small></p>
  <div class="withLove">
    <span class="alpha" data-scroll-reveal="move 50px enter left over 1s no reset">Made with</span>
    <svg class="heart" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="92.515px" height="73.161px" viewBox="0 0 92.515 73.161" enable-background="new 0 0 92.515 73.161" xml:space="preserve">
      <g>
        <path fill="#010101" d="M82.32,7.888c-8.359-7.671-21.91-7.671-30.271,0l-5.676,5.21l-5.678-5.21c-8.357-7.671-21.91-7.671-30.27,0
          c-9.404,8.631-9.404,22.624,0,31.255l35.947,32.991L82.32,39.144C91.724,30.512,91.724,16.52,82.32,7.888z"/>
      </g>
    </svg>
    <span class="omega" data-scroll-reveal="move 50px enter right over 1s no reset">in California</span>
  </div>
    <script type="text/javascript">
      (function($) {
        'use strict';
        window.scrollReveal = new scrollReveal({ reset: true, move: '50px' });
      })();
    </script>
<div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';">
</div>



用户评论
大牛,别默默的看了,快登录帮我点评一下吧!:)      登录 | 注册


热门标签: 滚动导航菜单 图片延迟加载 html5动画导航菜单 滚动切换 加载动画 html5图片动画 文字延迟加载 图片滚动 html5文字动画 文字滚动 html5表情动画 图片文字滚动 html5线条动画 全屏滚动 html5飘落动画 页面滚动 html5光标动画 html5悬停动画 滚动流动 加载动画 自动滚动图片轮播 html5弹窗动画 延长延迟加载 html5动画h5动画 html5按钮动画

×
×
51前端

注册

×
绑定手机

请绑定手机号,在继续操作

×
单次下载支付

应付金额:279

支付完成后,回到下载页面,在进行下载

官方QQ群
意见反馈
qq群

扫描上面二维码加微信群

官方QQ群

jQuery/js讨论群
群号:642649996
Css3+Html5讨论群
群号:322131262

加群请备注:从官网了解到