DOM

settings_applicationsEventTarget  >   settings_applicationsNode  >   settings_applicationsElement  >   settings_applications[[Prototype]]

DOM

Editing
  • account_tree
  • bug_report

scroll(Numberx-coords, Numbery-coords | Objectoptions)

요소 내부의 특정 좌표로 스크롤한다.

구문

형식
htmlElement.scroll(x-coords, y-coords);
형식
htmlElement.scroll(options);

매개 변수

Use of parameters type 1
Numberx-coords필수

요소를 스크롤하려는 수평 방향 좌표를 픽셀로 지정한다.

Numbery-coords필수

요소를 스크롤하려는 수직 방향 좌표를 픽셀로 지정한다.

Use of parameters type 2
Objectoptions필수

다음 속성을 포함하는 객체를 지정한다.

  • left : 수평 스크롤 위치를 나타내는 픽셀 값을 지정한다.
  • top : 수직 스크롤 위치를 나타내는 픽셀 값을 지정한다.
  • behavior : 스크롤 방법을 'auto''smooth' 중에서 선택한다. 'smooth'를 선택하면 부드럽게 스크롤되고 'auto'는 즉시 스크롤 된다. 기본 값은 'auto'이다.

버전 명세

CSSOM View Module
#dom-element-scroll

지원 웹브라우저