美文网首页
全屏滚动-fullPage

全屏滚动-fullPage

作者: 977777 | 来源:发表于2018-01-27 23:31 被阅读45次

全屏网站看起来很爽的样子
先看iPhone的网站体验一哈,高端大气上档次
今天使用jQuery插件fullPage.js来实现全屏滚动的效果

主要功能
  • 支持鼠标滚动
  • 支持前后进退和键盘控制
  • 多个回调函数
  • 支持手机,平板触摸事件
  • 支持CSS3动画
  • 支持窗口缩放
  • 窗口缩放时自动调整
  • 可设置滚动宽度、背景颜色、滚动速度、循环选项、回调、文本对齐方式等等
使用方法

1.引入文件

  • 方式一
    1.通过Bower下载:
    bower install fullpage --save
    2.引入
<link rel="stylesheet" type="text/css" href="/bower_components/fullpage/jquery.fullPage.css" />

<script src="https://cdn.bootcss.com/jquery/1.9.1/jquery.min.js"></script>

<!-- This following line is optional. Only necessary if you use the option css3:false and you want to use other easing effects rather than "linear", "swing" or "easeInOutCubic". -->
<script src="vendors/jquery.easings.min.js"></script>

<!-- This following line is only necessary in the case of using the option `scrollOverflow:true` -->
<script type="text/javascript" src="vendors/scrolloverflow.min.js"></script>

<script type="text/javascript" src="/bower_components/fullpage/jquery.fullPage.js"></script>

  • 方式二
    通过CDN引入fullPage.js
<link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/fullPage.js/2.9.3/jquery.fullpage.min.css" />

<script src="https://cdn.bootcss.com/jquery/1.9.1/jquery.min.js"></script>

<!-- This following line is optional. Only necessary if you use the option css3:false and you want to use other easing effects rather than "linear", "swing" or "easeInOutCubic". -->
<script src="https://cdn.bootcss.com/fullPage.js/2.9.3/vendors/jquery.easings.min.js"></script>

<!-- This following line is only necessary in the case of using the option `scrollOverflow:true` -->
<script type="text/javascript" src="https://cdn.bootcss.com/fullPage.js/2.9.3/vendors/scrolloverflow.min.js"></script>

<script type="text/javascript" src="https://cdn.bootcss.com/fullPage.js/2.9.3/jquery.fullpage.min.js"></script>

2.html文件结构

<div id="dowebok">
    <div class="section">
        <h3>第一屏</h3>
    </div>
    <div class="section">
        <h3>第二屏</h3>
    </div>
    <div class="section">
        <h3>第三屏</h3>
    </div>
    <div class="section">
        <h3>第四屏</h3>
    </div>
</div>

在每一屏中还可以包含可以在水平方向上滚动切换的slide。

<div id="full-page">
    <div class="section">第一屏</div>
    <div class="section">第二屏</div>
    <div class="section">
        <div class="slide">第三屏的第一屏</div>
        <div class="slide">第三屏的第二屏</div>
        <div class="slide">第三屏的第三屏</div>
        <div class="slide">第三屏的第四屏</div>
    </div>
    <div class="section">第四屏</div>
</div>

3.js文件内容

 <script>
        $(function(){
            $('#dowebok').fullpage();
            // 调用此方法进行初始化
        });
    </script>    

这样子就可以实现啦。
实现文件地址

相关文章

  • 全屏滚动

    jquery.fullPage.js全屏滚动插件教程演示

  • 第十一周第五天笔记之fullpage全屏页面滚动插件

    fullpage全屏页面滚动插件 链接解读链接地址:fullpage基础知识解读 fullpage中遇到的问题吸顶...

  • jQuery相关插件

    jQuery全屏滚动插件fullPage.js jquery轮播图插件unslider

  • 全屏滚动-fullPage

    全屏网站看起来很爽的样子先看iPhone的网站体验一哈,高端大气上档次今天使用jQuery插件fullPage.j...

  • FullPage基本使用

    FullPage 基于 jQuery的插件,它能够很方便、很轻松的制作出全屏滚动网站 注意:由于fullPage....

  • 全屏滚动插件fullpage的使用

    1.fullpage插件简介 fullpage是jQuery的插件,可以方便的实现全屏滚动的效果。 因为fullp...

  • Fullpage 10.15

    Fullpage Fullpage.js是一个基于jQuery的插件,方便制作全屏网站,主要功能有: 支持鼠标滚动...

  • Fullpage

    FullPage fullPage.js 是一个基于 jQuery 的插件,它能够很方便、很轻松的制作出全屏滚动网...

  • jquery全屏滚动插件fullpage中文文档

    今天给大家带来一款Jquery全屏滚动插件fullpage,这款插件可以非常方便快速的做一个全屏滚动高大上的网站,...

  • fullpage框架

    jQuery的一个全屏jQuery全屏滚动插件fullPage.js。我们经常见到一些全屏的特绚丽页面,手指或者鼠...

网友评论

      本文标题:全屏滚动-fullPage

      本文链接:https://www.haomeiwen.com/subject/zywoaxtx.html