Why Using translate() for Element Movement is Superior to Pos: abs Top/left Read the full article Lisa Anderson
I struggled with implementing a CSS3 translate animation, so I opted for a jQuery solution that achieves the same effect. Click on the X icon .navi-toggle in the top left corner to see it in action. However, the motion appears somewhat choppy, leaving me intrigued by the potential smoothness of using translate().
View Codepen demo
HTML
<div id="page-container">
<nav id="route-bar" >
</nav>
<div class="w-panel">
<div class="navi-toggle">X</div>
<div class="panel">
</div><!--end of w-panel-->
</div><!--end of page container-->
CSS
.open-panel
{
left:336px;
}
coffeescript
$(".navi-toggle").on
click: ->
$(".w-panel").toggleClass "open-panel"