Document
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.ball {
position: fixed;
z-index: 1010;
width: 20px;
height: 20px;
transition: all 0.5s linear ;
/* transition-delay: 2s; */
}
.innerBall {
width: 100%;
height: 100%;
background: red;
border-radius: 50%;
overflow: hidden;
transition: all 0.5s cubic-bezier(0.55, 0, 0.85, .36) ;
}
</style>
<script>
window.onload = function() {
document.getElementById('ball').style = 'transform: translate(100px, 0px);'
document.getElementById('innerBall').style = 'transform: translate(0px, 200px);'
}
</script>
</head>
<body>
<div id="ball" class="ball">
<div id="innerBall" class="innerBall">
</div>
</div>
</body>
</html>