Appearance
I.scrollBy()
Scrolls the page horizontally and vertically by a given number of pixels.
Usage
js
I.scrollBy(x: number, y: number)Parameters
| Parameter | Type | Description |
|---|---|---|
x | number | Number of pixels to scroll right by. Use a negative number to scroll left instead. |
y | number | Number of pixels to scroll down by. Use a negative number to scroll up instead. |
Example
js
I.scrollBy(200, -500)Scrolls the page 200 pixels to the right, and 500 pixels up.