From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- files/ru/web/api/element/scrollto/index.html | 72 ++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 files/ru/web/api/element/scrollto/index.html (limited to 'files/ru/web/api/element/scrollto') diff --git a/files/ru/web/api/element/scrollto/index.html b/files/ru/web/api/element/scrollto/index.html new file mode 100644 index 0000000000..c6f78187e4 --- /dev/null +++ b/files/ru/web/api/element/scrollto/index.html @@ -0,0 +1,72 @@ +--- +title: Element.scrollTo() +slug: Web/API/Element/scrollTo +translation_of: Web/API/Element/scrollTo +--- +
{{ APIRef }}
+ +

scrollTo() метод интерфейса  {{domxref("Element")}}, осуществляет прокрутку по заданному набору координат внутри данного элемента. 

+ +

Синтаксис

+ +
element.scrollTo(x-coord, y-coord)
+element.scrollTo(options)
+
+ +

Параметры

+ + + +

- or -

+ + + +

Примеры

+ +
element.scrollTo(0, 1000);
+
+ +

С помощью options:

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

Спецификации

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{ SpecName('CSSOM View', '#dom-element-scrollto-options-options', 'element.scrollTo()') }}{{ Spec2('CSSOM View') }}Initial definition.
+ +

Браузерная совместимость

+ + + +

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

+ +

Смотри также

+ + -- cgit v1.2.3-54-g00ecf