.sample01 { position: absolute; top: 1500px; left: 50px; width: 100px; height: 100px; background: #E74C3C; transition: 2000ms; } .sample01.is-show { -webkit-transform: translateX(500px); transform: translateX(500px); } .sample02 { position: absolute; top: 3000px; right: 50px; width: 100px; height: 100px; background: #3498DB; } .sample02.is-show { -webkit-transform: translateX(-500px); transform: translateX(-500px); transition: 2000ms; }