blob: fa56648a5f853fdae9e2acae3c46b804443f7d0e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<!DOCTYPE html>
<html>
<head>
<style>
#container {
width: 200px;
height: 200px;
overflow: scroll;
}
#content {
width: 750px;
height: 10000px;
background-color: blue;
}
</style>
<div id="container">
<div id="content"></div>
</div>
<script type="text/javascript">
if (window.internals)
internals.settings.setScrollAnimatorEnabled(true);
requestAnimationFrame(() => {
if (container.scrollTo)
container.scrollTo({left: 750, top: 10000, behavior: 'smooth'});
else
console.log('ERROR: no container.scrollTo');
});
</script>
</head>
</html>
|