用swiper4实现的拥有header和footer的全屏滚动demo,

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Fullpage-Swiper</title>
<link href="https://cdn.bootcss.com/Swiper/4.0.6/css/swiper.css" rel="stylesheet">
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.js"></script>
<script src="https://cdn.bootcss.com/Swiper/4.0.6/js/swiper.js"></script> <style>
html, body {
position: relative;
height: 100%;
} body {
background: #eee;
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
font-size: 14px;
color: #000;
margin: 0;
padding: 0;
} .swiper-container {
width: 100%;
height: 100%;
margin-left: auto;
margin-right: auto;
} .swiper-slide {
text-align: center;
font-size: 18px;
background: #fff; /* Center slide text vertically */
display: -webkit-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
} .header, .footer {
height: 100px;
}
</style>
</head>
<body> <!-- Swiper -->
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide header">header</div>
<div class="swiper-slide">section 1</div>
<div class="swiper-slide">section 2</div>
<div class="swiper-slide">section 3</div>
<div class="swiper-slide">section 4</div>
<div class="swiper-slide footer">footer</div>
</div>
<!-- Add Pagination -->
<div class="swiper-pagination"></div>
</div> <!-- Initialize Swiper -->
<script>
var swiper = new Swiper('.swiper-container', {
direction: 'vertical',
slidesPerView: 'auto',
spaceBetween: 10,
mousewheel: true,
pagination: {
el: '.swiper-pagination',
clickable: true,
},
});
</script> </body>
</html>

swiper4实现的拥有header和footer的全屏滚动demo/swiper fullpage footer的更多相关文章

  1. fullpagejs实现的拥有header和foooter的全屏滚动demo/fullpage footer

    fullpagejs实现的拥有header和foooter的全屏滚动, 技术要点:给section元素加fp-auto-height类, <!DOCTYPE html> <html ...

  2. 关于footer 小于一屏还要在底部显示的思考

    首先想到了页面是动态的  就是js 计算 但是有一个简单的方法就是 运用定位 1 footer 的祖先元素没有定位属性 absoulite (这样他就会相对于文档定位) left:0 bottom : ...

  3. h5中的结构元素header、nav、article、aside、section、footer介绍

    结构元素不具有任何样式,只是使页面元素的的语义更加明确. header元素 header元素是一种具有引导和导航作用的的结构元素,该元素可以包含所有通常放在页面头部的内容.header元素通常用来放置 ...

  4. 原生JS实现全屏切换以及导航栏滑动隐藏及显示——重构前

    思路分析: 向后滚动鼠标滚轮,页面向下全屏切换:向前滚动滚轮,页面向上全屏切换.切换过程为动画效果. 第一屏时,导航栏固定在页面顶部,切换到第二屏时,导航条向左滑动隐藏.切换回第一屏时,导航栏向右滑动 ...

  5. Web前端理论知识记录

      Web前端理论知识记录 Elena· 5 个月前 cookies,sessionStorage和localStorage的区别? sessionStorage用于本地存储一个会话(session) ...

  6. JavaScript资源大全中文版(Awesome最新版--转载自张果老师博客)

    JavaScript资源大全中文版(Awesome最新版)   目录 前端MVC 框架和库 包管理器 加载器 打包工具 测试框架 框架 断言 覆盖率 运行器 QA 工具 基于 Node 的 CMS 框 ...

  7. JavaScript资源大全

    目录 前端MVC 框架和库 包管理器 加载器 打包工具 测试框架 框架 断言 覆盖率 运行器 QA 工具 基于 Node 的 CMS 框架 模板引擎 数据可视化 编辑器 UI 输入 日历 选择 文件上 ...

  8. 全屏滚动-jQuery插件实现

    全屏滚动 <---很久没写了,这段忙了点,以后还是每周尽量写点东西---> 在很多情况下,我们需要页面的全屏滚动,尤其是移动端.今天简要的介绍一下全屏滚动的知识. 一.全屏滚动的原理 1. ...

  9. Awesome Javascript(中文翻译版)

    [导读]:GitHub 上有一个 Awesome – XXX 系列的资源整理.awesome-javascript 是 sorrycc 发起维护的 JS 资源列表,内容包括:包管理器.加载器.测试框架 ...

随机推荐

  1. Ubuntu14.04 64bit下Caffe + CUDA 6.5安装详细步骤

    不多说,直接上干货! 笔者花了很长时间才装完,主要是cuda安装和opencv安装比较费劲,cuda找不到32位的安装包只好重装64位的ubuntu系统,opencv 也是尝试了很久才解决,这里建议用 ...

  2. Building Microservices: Using an API Gateway

    What are microservices? http://microservices.io/ What are microservices? Microservices - also known ...

  3. java集合的关系

    在 Java2中,有一套设计优良的接口和类组成了Java集合框架Collection,使程序员操作成批的数据或对象元素极为方便.这些接口和类有很多对抽象数据类型操作的API,而这是我们常用的且在数据结 ...

  4. YTU 2892: I--免费看电影

    2892: I--免费看电影 时间限制: 1 Sec  内存限制: 128 MB 提交: 30  解决: 12 题目描述 万象城星美影院开业1周年了,要举行为期一天的大酬宾,ACM队员准备去看电影.已 ...

  5. 使用JSTL 对在页面上对 0,0,1 的分割处理 forTokens

    使用JSTL 对在页面上对 0,0,1 的分割处理 <tr onmouseover="currentcolor=this.style.backgroundColor;this.styl ...

  6. POJ - 3177 Redundant Paths(边双连通分支)(模板)

    1.给定一个连通的无向图G,至少要添加几条边,才能使其变为双连通图. 2. 3. //边双连通分支 /* 去掉桥,其余的连通分支就是边双连通分支了.一个有桥的连通图要变成边双连通图的话, 把双连通子图 ...

  7. echo 到 stderr

    This question is old, but you could do this, which facilitates reading: >&2 echo "error& ...

  8. Masonry自动布局:复合约束

    前言 说到iOS自动布局,有很多的解决办法.有的人使用xib/storyboard自动布局,也有人使用frame来适配.对于前者,笔者并不喜欢,也不支持.对于后者,更是麻烦,到处计算高度.宽度等,千万 ...

  9. 【HAOI 2015】 树上操作

    [题目链接] 点击打开链接 [算法] 树链剖分 子树的DFS序是连续的一段! [代码] #include<bits/stdc++.h> using namespace std; #defi ...

  10. react-native页面之间的相互传值

    react-native页面之间的相互传值 之前在自己学习react-native的时候,在页面跳转和传值问题上花了一段时间去网上搜索和查找资料,自己总结了两个方法.可以参考 https://blog ...