导读 本文为大家带来滚动框的scrolltop scrolltop 的相关内容,更多精彩的内容就来无忧生活网吧!
关于滚动框的scrolltop,scrolltop这个很多人还不知道,今天小六来为大家解答以上的问题,现在让我们一起来看看吧!
1、scrolltop是jQuery中的一个方法,它可以设置 元素中滚动条的垂直偏移量,基本的用法是:scrollTop() 方法返回或设置匹配元素的滚动条的垂直位置。
2、scroll top offset 指的是滚动条相对于其顶部的偏移。
3、如果该方法未设置参数,则返回以像素计的相对滚动条顶部的偏移。
4、工具原料:jQuery、编辑器、浏览器在一个有内容的div中是吸纳设置滚动条的偏移量和获取偏移量的值,代码如下:
This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text.2、运行的效果如下:点击设置为100px后的效果:点击获取值的效果:。本文到此分享完毕,希望对大家有所帮助。