<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
.container { | |
height: 100px; | |
width: 500px; | |
margin: 4px; | |
border: 1px solid black; | |
} | |
.box { | |
position: relative; | |
width: 100px; | |
height: 100px; | |
background-color: green; | |
} | |
.mover { | |
left: 200px; | |
} | |
.slider { | |
transform: translate3d(200px, 0, 0); | |
} | |
</style> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="mover box"></div> | |
</div> | |
<div class="container"> | |
<div class="slider box"></div> | |
</div> | |
</body> | |
</html> |