Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<head>
<style>
div {
  width: 100px;
  height: 100px;
  background-color: lightgreen;
  border: 2px solid black;
  padding: 10px;
}
#myDiv1 {
  transform: translate(50px); /* moves the element 50px along the x-axis, and 0px along the y-axis */
}
#myDiv2 {
  transform: translate(50px, 20px); /* moves the element 50px along the x-axis, and 20px along the y-axis */
}
#myDiv3 {
  transform: translate(100px, 30px); /* moves the element 100px along the x-axis, and 30px along the y-axis */
}
</style>
</head>
<body>
<h1>The translate() function</h1>
<div>
This a normal div element.
</div>
<div id="myDiv1">
Div1.
</div>
<div id="myDiv2">
Div2.
</div>
<div id="myDiv3">
Div3.
</div>