<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
.main { | |
position: absolute; | |
top: 200px; | |
left: 100px; | |
width: 200px; | |
height: 200px; | |
background-color: lightblue; | |
will-change: transform; | |
} | |
.squahed { | |
position: absolute; | |
top: 250px; | |
left: 100px; | |
width: 200px; | |
height: 200px; | |
background-color: lightgreen; | |
} | |
</style> | |
<script> | |
onload = function() { | |
window.scrollTo(0, 100); | |
} | |
</script> | |
</head> | |
<body style="height:2000px"> | |
<div class="main"></div> | |
<div class="squahed"></div> | |
</body> | |
</html> |