对象固定在一定点以下 [英] Object fixed below certain point

查看:95
本文介绍了对象固定在一定点以下的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的第一篇文章,在这之前,我已经从这个论坛和所有的用户以前的帖子的巨大帮助。我现在的问题我找不到答案。所以:



我有一个对象(按钮),当按下时将用户平滑滚动到页面顶部。我成功地把它固定在屏幕的顶部,但是,让我们说,你在页面的底部,你按平滑滚动按钮,它开始向上滚动你到顶部。但是当你的靠近顶部,我想让按钮停止,滚动继续...



我不知道如何描述更好,但如果你去从页面顶部,或当在页面的顶部,你看不到按钮,当你开始向下滚动,你会看到按钮作为屏幕上的任何对象上升,当按钮到达顶部



如何做到这一点呢?



你实现这个?任何帮助赞赏..



Thx,



Layman



http://stickyjs.com/



如果您还没有留下深刻的印象......这里是一个链接到



http://jquery-plugins.net/tag/sticky-scroll


This is my first post here, before this I have had tremendous help from this forum and all the users previous posts. The question I have now I cannot find the answer to. So:

I have an object (button) which when pressed smoothscrolls the user up to top of the page. Im successful in making it fixed to the top of the screen, however, lets say youre at the bottom of the page and you press the "smoothscroll button", its starts scrolling you upwards to the top. But when your "near" the top I want the button to stop and the scrolling to continue...

Im not sure how to describe it better, but if you go from the top of the page, or when at the top of the page, you dont see the button and when you start scrolling down, youll see the button as any object on the screen "climbing upwards" and when the button reaches the top of the screen it stays there fixed.

Im sure this is common on ads for example..

How would you achieve this? Any help appreciated..

Thx,

Layman

解决方案

It seems like this is what you want to achieve.

http://stickyjs.com/

if you are still not impressed.. here is a link to the treasure of plugins that would do what you need with very little code.

http://jquery-plugins.net/tag/sticky-scroll

这篇关于对象固定在一定点以下的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆