From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/api/element/scrollby/index.html | 74 ++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 files/ja/web/api/element/scrollby/index.html (limited to 'files/ja/web/api/element/scrollby') diff --git a/files/ja/web/api/element/scrollby/index.html b/files/ja/web/api/element/scrollby/index.html new file mode 100644 index 0000000000..c78fe8f1e1 --- /dev/null +++ b/files/ja/web/api/element/scrollby/index.html @@ -0,0 +1,74 @@ +--- +title: Element.scrollBy() +slug: Web/API/Element/scrollBy +tags: + - API + - CSSOM View + - Element + - Method + - Reference + - scrollBy + - メソッド +translation_of: Web/API/Element/scrollBy +--- +

{{APIRef}}

+ +

scrollBy() は {{domxref("Element")}} インターフェイスのメソッドで、指定された量だけ要素をスクロールします。

+ +

構文

+ +
element.scrollBy(x-coord, y-coord);
+element.scrollBy(options)
+
+ +

引数

+ + + +

- または -

+ + + +

+ +
// 要素をスクロール
+element.scrollBy(300, 300);
+
+ +

options を使用する場合:

+ +
element.scrollBy({
+  top: 100,
+  left: 100,
+  behavior: 'smooth'
+});
+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{ SpecName('CSSOM View', '#dom-element-scrollby-options-options', 'element.scrollBy()') }}{{ Spec2('CSSOM View') }}初回定義
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.Element.scrollBy")}}

-- cgit v1.2.3-54-g00ecf