Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<meta charset="utf-8">
<style>
#anchor {
width: 100px;
height: 100px;
margin-left: 150vw;
background: orange;
}
#target {
width: 100px;
height: 100px;
margin-top: -100px;
margin-left: calc(150vw - 100px);
background: green;
}
</style>
<div id="anchor">anchor</div>
<div id="target">target</div>
<script>
document.documentElement.scrollLeft = document.documentElement.scrollWidth;
</script>