10--jQuery插件大全-- fullPage

fullPage 全屏滚动插件

            - 官网[https://alvarotrigo.com/fullPage/](https://alvarotrigo.com/fullPage/)
            - github[https://github.com/alvarotrigo/fullpage.js/](https://github.com/alvarotrigo/fullpage.js/)

全屏轮播图展示如下:

 代码如下:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>fullPage</title>
    <link rel="stylesheet" href="../css/fullPage/css/fullpage.css">
    <script src="../js/jquery-3.3.1.min.js"></script>
    <script src="../js/fullPage.js/js/fullpage.min.js"></script>
    <style>
        #fullPage {
            text-align: center;
            color: white;
        }

        h1 {
            font-size: 5em
        }

        #fp-nav ul li a span, .fp-slidesNav ul li a span {
            background: #fff;
        }

        .fp-controlArrow.fp-next {
            right: 50px
        }

        .fp-controlArrow.fp-prev {
            left: 50px
        }

        .nav {
            position: fixed;
            top: 10px;
            right: 30px;
            z-index: 1000;
        }

        .nav a {
            text-decoration: none;
            color: white;
            padding: 10px
        }

        .fp-tableCell > img {
            max-width: 100%
        }
    </style>
</head>
<body>
<div class="nav">
    <a href="#homePage">首页</a>
    <a href="#secondPage">介绍</a>
    <a href="#thirdPage">功能</a>
    <a href="#lastPage">演示</a>
</div>
<div id="fullPage">
    <div class="section">
        <h1>欢迎使用fullPage</h1>
    </div>
    <div class="section">
        <h2>第一页</h2>
    </div>
    <div class="section">
        <div class="slide"><img src="../img/banner_1.jpg" alt=""></div>
        <div class="slide"><img src="../img/banner_2.jpg" alt=""></div>
        <div class="slide"><img src="../img/banner_3.jpg" alt=""></div>
    </div>
    <div class="section"><h2>最后一页</h2></div>
</div>
<script>
    $(function () {
        $("#fullPage").fullpage({
            autoScrolling: true,
            scrollHorizontally: true,
            sectionsColor: ['orange', 'skyblue', 'pink', 'red'],
            navigation: true,
            navigationTooltips: ['第一页', '第二页', '第三页', '最后一页'],
            slidesNavigation: true,
            anchors: ['homePage', 'secondPage', 'thirdPage', 'lastPage'],
        });
    })
</script>
</body>
</html>

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值