滚动框的scrolltop_scrolltop-环球热议
来源:互联网
发布日期:2023-06-17 15:44:58
【资料图】
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后的效果:点击获取值的效果:。本文到此分享完毕,希望对大家有所帮助。
关键词: