angular-fullpage实现尾屏效果
来源:互联网 发布:子曰能以礼让为国乎 编辑:程序博客网 时间:2024/06/07 22:49
接 前一篇 angular-fullpage实现全屏滚动
<div full-page options="vm.homeOptions">
<div class="section" data-anchor="section1"></div>
<div class="section" data-anchor="section2"></div>
<div class="section" data-anchor="section3"> </div>
<div class="section" id="section-footer" data-anchor="footer"><div id="footer-text" style="height: 230px"></div></div>
</div>
修改jquery.fullpage.js 源代码performMovement方法,因为之前设置了css3为false,所以进到else中修改滚动到尾屏的处理方式
if (options.css3&&options.autoScrolling && !options.scrollBar) {
var translate3d = 'translate3d(0px, -' + v.dtop + 'px, 0px)';
transformContainer(translate3d, true);
//even when the scrollingSpeed is 0 there's a little delay, which might cause the
//scrollingSpeed to change in case of using silentMoveTo();
if(options.scrollingSpeed){
afterSectionLoadsId = setTimeout(function () {
afterSectionLoads(v);
}, options.scrollingSpeed);
}else{
afterSectionLoads(v);
}
}
// using jQuery animate
else{
if (v.anchorLink == 'footer')//判断当滚动到尾屏如何做
{
var footer_a = $('#section-footer').height();
var footer_h = $('#footer-text').height();
var scrollSettings = getScrollSettings(v);
scrollSettings.options = { 'top': -(v.dtop - footer_a + footer_h)};
scrollSettings.element = WRAPPER_SEL;
$(scrollSettings.element).animate(
scrollSettings.options, options.scrollingSpeed, options.easing).promise().done(function () { //only one single callback in case of animating `html, body`
afterSectionLoads(v);
});
}else{
var scrollSettings = getScrollSettings(v);
$(scrollSettings.element).animate(
scrollSettings.options, options.scrollingSpeed, options.easing).promise().done(function () { //only one single callback in case of animating `html, body`
afterSectionLoads(v);
});
}
}
效果图:
- angular-fullpage实现尾屏效果
- fullPage教程 -- 整屏滚动效果插件 fullpage详解e
- fullPage教程 -- 整屏滚动效果插件 fullpage详解
- 使用fullpage.js实现全屏滚动效果
- 整屏滚动效果插件 fullpage详解
- 整屏滚动效果插件 fullpage详解
- fullpage中实现类似锤子官网的效果
- 全屏滚动实现:fullPage.js和fullPage
- fullPage插件全屏滑动效果
- FullPage.js – 轻松实现全屏滚动(单页网站)效果的应用
- Angular中实现文字的渐变效果
- Angular实现简单购物车效果(代码)
- 记录使用angular实现分页效果
- 学习fullpage.js插件实现滚屏心得
- jquery插件fullPage.js完成全屏效果
- angular.js指令集实现模态框拖动效果
- 使用fullpage.js轻松实现全屏滚动
- 利用FullPage.js实现全屏滚动插件
- VC 6.0 实现串口通信
- java零拷贝原理
- 内存管理(3602017秋招真题)
- Python 工具pip的安装使用 xlrd
- System.IO.IOException: Sharing violation on pat
- angular-fullpage实现尾屏效果
- 宋牧春: Linux设备树文件结构与解析深度分析(1)
- spring-boot 实现通过访问路径后加参数返回json数据
- 写给自己的
- Apsara Clouder云计算专项技能认证的网站建设-部署与发布,你知道吗?
- 经典算法_求数组中出现1次的数
- 单调栈--poj3250 Bad Hair Day
- 区分:阻止事件冒泡(stopPropagation)与阻止默认行为(preventDefault)
- 对JAVA RMI的认识(转)