This commit is contained in:
Ilya Kantor 2020-06-07 18:57:32 +03:00
parent 020f2ea5e2
commit d35baee32d

View file

@ -211,7 +211,7 @@ If you click the element below, the code `elem.scrollTop += 10` executes. That m
<div onclick="this.scrollTop+=10" style="cursor:pointer;border:1px solid black;width:100px;height:80px;overflow:auto">Click<br>Me<br>1<br>2<br>3<br>4<br>5<br>6<br>7<br>8<br>9</div>
```
Setting `scrollTop` to `0` or `Infinity` will make the element scroll to the very top/bottom respectively.
Setting `scrollTop` to `0` or a big value, such as `1e9` will make the element scroll to the very top/bottom respectively.
````
## Don't take width/height from CSS