利用JS實現滾動觸發動畫插件scrollreveal特效



56 223 75



特效描述:利用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>



用戶評論
大牛,別默默的看了,快登錄幫我點評一下吧!:)      登錄 | 注冊


熱門標簽: 滾動 滾動條 頁面滾動 滾動插件 滾動條插件 滾動條美化 加載動畫 自動滾動圖片輪播 h5彈窗動畫 html5彈窗動畫 延遲加載 無限加載 延遲 加載 h5動畫 h5背景動畫 h5場景動畫 h53D動畫 h5界面動畫 html5動畫 h5按鈕動畫 html5按鈕動畫 加載動畫 h5線條動畫 html5線條動畫 全屏滾動
?
×
×

注冊

官方QQ群

掃描上面二維碼加微信群

官方QQ群

jQuery/js討論群
群號:642649996
Css3+Html5討論群
群號:322131262

加群請備注:從官網了解到

湖北30选5开奖结果走势图表