<div class="box box1">
  <div class="transform tran1"></div>
</div>

<div class="box box2">
  <div class="transform tran2"></div>
</div>

<div class="box box3">
  <div class="transform tran3"></div>
</div>

.box{position:relative; width:100px; height:100px; display:inline-block; background: #ccc; border:1px solid #ccc; margin-right:100px;}
.transform{position:absolute;top:0; left:0; width:100%; height:100px; background: #444;}
.box1:hover .tran1{
  transform: translateX(30px);
}
.box2:hover .tran2{
  transform: translateY(30px);
}
.box3:hover .tran3{
  transform: translate(30px,30px);
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.