A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.cdn.mozilla.net/ja/docs/Web/API/Window/scrollTo below:

window.scrollTo - Web API | MDN

window.scrollTo

Baseline Widely available

Window.scrollTo() は文書内の特定の組み合わせの座標までスクロールします。

構文
window.scrollTo(x-coord, y-coord)
window.scrollTo(options)
引数

- または -

例
window.scrollTo(0, 1000);

options の使用例:

window.scrollTo({
  top: 100,
  left: 100,
  behavior: "smooth",
});
注

Window.scroll() はこのメソッドとほぼ同じです。相対スクロールについては、 Window.scrollBy(), Window.scrollByLines(), Window.scrollByPages() を参照してください。

要素をスクロールするには、 Element.scrollTop および Element.scrollLeft を参照してください。

仕様書 ブラウザーの互換性

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4