Hopefully this gets you a bit closer. Based on your CodePen example you really just need to animate the width
, which could be done using keyframes
or possibly a transition
.
CSS
.open-panel {
-webkit-animation-duration: 2s;
-webkit-animation-iteration-count:1;
-webkit-animation-name: slideOver;
-webkit-transform:translateX(90%);
}
@-webkit-keyframes slideOver {
from {
-webkit-transform:translateX(0%);
}
to {
-webkit-transform:translateX(90%);
}
}
Here's the full jsFiddle (apologies on the -webkit prefix, hopefully this gets you started).