技术标签: 全屏滚动插件
fullPage下载地址https://github.com/alvarotrigo/fullPage.js/archive/master.zip
fullPage github地址https://github.com/alvarotrigo/fullPage.js/
工具下载方法
// With bower bower install fullpage.js // With npm npm install fullpage.js
If you prefer to use a CDN to load the needed files, fullPage.js is in CDNJS: https://cdnjs.com/libraries/fullPage.js
上手首先要有一个div作为所有元素的父级
<div id="fullPage"></div> 这个id不能给body
如果想要其他的页面首先显示出来,可以给这个页面添加active类名
如果想要在其他页面写一个banner可以这样
$(document).ready(function() { $('#fullpage').fullpage(); });更多的扩展参数
$(document).ready(function() { $('#fullpage').fullpage({ //Navigation menu: '#menu', lockAnchors: false, anchors:['firstPage', 'secondPage'], navigation: false, navigationPosition: 'right', navigationTooltips: ['firstSlide', 'secondSlide'], showActiveTooltip: false, slidesNavigation: false, slidesNavPosition: 'bottom', //Scrolling css3: true, scrollingSpeed: 700, autoScrolling: true, fitToSection: true, fitToSectionDelay: 1000, scrollBar: false, easing: 'easeInOutCubic', easingcss3: 'ease', loopBottom: false, loopTop: false, loopHorizontal: true, continuousVertical: false, continuousHorizontal: false, scrollHorizontally: false, interlockedSlides: false, dragAndMove: false, offsetSections: false, resetSliders: false, fadingEffect: false, normalScrollElements: '#element1, .element2', scrollOverflow: false, scrollOverflowReset: false, scrollOverflowOptions: null, touchSensitivity: 15, normalScrollElementTouchThreshold: 5, bigSectionsDestination: null, //Accessibility keyboardScrolling: true, animateAnchor: true, recordHistory: true, //Design controlArrows: true, verticalCentered: true, sectionsColor : ['#ccc', '#fff'], paddingTop: '3em', paddingBottom: '10px', fixedElements: '#header, .footer', responsiveWidth: 0, responsiveHeight: 0, responsiveSlides: false, parallax: false, parallaxOptions: {type: 'reveal', percentage: 62, property: 'translate'}, //Custom selectors sectionSelector: '.section', slideSelector: '.slide', lazyLoading: true, //events onLeave: function(index, nextIndex, direction){}, afterLoad: function(anchorLink, index){}, afterRender: function(){}, afterResize: function(){}, afterResponsive: function(isResponsive){}, afterSlideLoad: function(anchorLink, index, slideAnchor, slideIndex){}, onSlideLeave: function(anchorLink, index, slideIndex, direction, nextSlideIndex){} }); });如果想添加锚点跳转,可以这样
js里添加一个这样的属性
$(document).ready(function() { $('#fullpage').fullpage({ anchors:['firstPage', 'secondPage', 'thirdPage'] }); });在section里加入属性data-anchor js里不写这个属性也能实现这个效果
切记data-anchor的属性值不能和其他元素的id名一样!!!
如果想要你的section是小的可以添加class
<div class="section">Whole viewport</div> <div class="section fp-auto-height">Auto height</div>如果想要section的高度是响应式的可以添加class fp-auto-height-responsive
图片的延时加载也是可以做到的
images, videos and audio都支持延时,如果已经使用了其他的延时工具可以在js中加入lazyLoading: false
<img data-src="image.png">
<video>
<source data-src="video.webm" type="video/webm" />
<source data-src="video.mp4" type="video/mp4" />
</video>
Note: the autoplay feature might not work on some mobile devices depending on the OS and browser (i.e. Safari on iOSversion < 10.0).
媒体的自动播放可以使用标签自己的属性,也可以使用data-autoplay
<audio data-autoplay> <source src="http://metakoncept.hr/horse.ogg" type="audio/ogg"> </audio>当桌面换到非媒体板块时可以使用data-keepplaying让媒体保持继续播放
<audio data-keepplaying> <source src="http://metakoncept.hr/horse.ogg" type="audio/ogg"> </audio>
Fullpage.js adds multiple classes in different elements to keep a record of the status of the site:
active
is added the current visible section and slide.active
is added to the current menu element (if using the menu
option).fp-viewing-SECTION-SLIDE
is added to the body
element of the site. (eg: fp-viewing-secondPage-0
) The SECTION
and SLIDE
parts will be the anchors (or indexes if no anchor is provided) of the current section and slide.fp-responsive
is added to the body
element when the entering in the responsive modefp-enabled
is added to the html
element when fullpage.js is enabled. (and removed when destroyed).fp-destroyed
is added to the fullpage.js container when fullPage.js is destroyed.fp-enabled
is added to the html
element once the libary is initalized.
题目,写的有点大了,其实就是 对一张表的基本处理,增删改查的基本操作演示。 好了,我们开始了。假如,我们在做一个单表处理,就举例是 学院(某个大学的学院) 吧。 首先,我们分析 学校这样表有哪些属性,分析完后,就可以在数据库中 建 depart 这张表了。 有三个属性:然后要在项目中 做一个 depart Bean 可以使用generate mybais 工具自动生成 depart mo
The Snail A snail is at the bottom of a 6-foot well and wants to climb to the top. The snail can climb 3 feet while the sun is up, but slides down 1 foot at night while sleeping. The s
1、启动或关闭(1)系统偏好设置启动或关闭:Launchpad——系统偏好设置——MySQL——Start/Stop MySQL Server终端命令启动或关闭:// 启动:sudo /usr/local/mysql/support-files/mysql.server start// 关闭sudo /usr/local/mysql/support-files/mysql.server stop(..._mac中mysql中运行语句
“最大子数组和”的变型题目描述动态规划思路和算法如果我们用 fmax(i)f_{\max}(i)fmax(i) 来表示以第 iii 个元素结尾的乘积最大子数组的乘积,aaa 表示输入参数 numsnumsnums,那么根据「53. 最大子序和」的经验,我们很容易推导出这样的状态转移方程:fmax(i)=maxi=1n{f(i−1)×ai,ai}f_{\max}(i) = \max_{i = 1}^{n} \{ f(i - 1) \times a_i, a_i \}fmax(i).
发布选项:50页选中Run In Background 即使游戏窗口失去焦点,也会在后台运行.如果在Display Resolution Dialog中选择Disabled,游戏在每次启动时不会显示一个用于设置显示分辨率的窗口。;Icon选择组;可以设置不同大小的图标,如果不指定,他们将会自动调用Default Icon中设置的图标并自动缩放。可能会有锯齿Override
在Instant类中,根据传递给它的参数,有两种类型的now()方法。now()Instant类的now()方法用于从系统UTC时钟获取当前时刻。此方法将基于系统UTC时钟返回时刻。用法:public static Instant now()参数:此方法不接受任何参数。返回值:此方法使用系统时钟返回当前时刻以下示例程序旨在说明now()方法:示例1:// Java program to demon..._instant.now()
本文主要参考《深入理解Java虚拟机》和《Java并发编程的艺术》对Java内存模型进行简单总结。_数据聪内存读取到缓存时load,read ,write
介绍的过程还是以一个测试例子来演示,这样更直观也更容易理解 使用谷歌浏览器打开一个测试的html文件,里面包含简单的js代码(只做演示) 按F12打开网页调试工具,默认打开的是Elements,显示的是网页标签元素,如下图 给js代码打断点,首先需要找到js资源文件,选择Source的tab标签,出现资源文件目录,选择对应的js代码文件 ...
文章目录操作系统图示简史_macos系统和linux系统发行时间
当前的前端世界中有很多著名的开源javascript模板引擎如Handlebars、Nunjucks、EJS等等,相信很多人对它们都并不陌生。js模板引擎的现状通常来讲,这些js模板引擎项目都有一个共同的特性:只专注渲染字符串(html)早在几年前Backbone等mv*框架流行的时候,js模板引擎遇到了它们的春天,因为Backbone可以支持选配用户自己喜好的模板,并提供了接入方案。但是在新一代...
介绍 参考 http://www.arduino.cn/thread-5960-1-1.html 转载于:https://my.oschina.net/surenpi/bl...
1.原型链2.盗用构造函数3.组合继承4.原型式继承5.寄生式继承6.寄生式组合继承_对象的继承