StupidBeauty
Read times:2499Posted at: - no title specified

Javascript文档翻译:Window.scroll()

内容目录

概述

语法

参数

示例

注意

概述

将窗口滚动到文档中特定的位置。

语法

window.scroll( x-coord , y-coord )

参数

  • •. x-coord ,水平方向上,在文档中,妳想要将其显示在左上角的那个点的像素偏移值。

  • •. y-coord ,竖直方向上,在文档中,妳想要将其显示在左上角的那个点的像素偏移值。

示例

<!-- 将竖直方向上第 100 个像素放置在窗口的顶部 -->

< button onClick =" scroll(0, 100); ">点击 以向下滚动 100 个像素 </ button >

注意

window.scrollTo 与此方法作用相同。若想重复地滚动特定的距离,则使用 window.scrollBy 。另外请参考 window.scrollByLines window.scrollByPages

瑞秋

瑞秋

瑞秋

Your opinions

Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands

 
Recent comments
2017年4月~2019年4月垃圾短信排行榜Posted at:Thu Sep 26 04:51:48 2024
Qt5.7文档翻译:QWebEngineCookieStore类,QWebEngineCookieStore ClassPosted at:Fri Aug 11 06:50:35 2023盲盒kill -9 18289 Grebe.20230517.211749.552.mp4