You could play around with the transform: rotate();
to give you the tilt effect. This in conjucture with CSS animation should give you what you are looking for.
Best part about this solution is that its purely CSS power.
Codepen here
.demo img{
width:50%;
-webkit-transform: rotate(0deg); /* Chrome, Safari, Opera */
transform: rotate(0deg);
animation-name: tilt;
animation-duration: 3s;
animation-iteration-count: infinite;
}
@keyframes tilt {
0% { transform: rotate(0deg); }
20% { transform: rotate(7deg); }
40% { transform: rotate(0deg); }
80% { transform: rotate(-7deg); }
100% { transform: rotate(0deg); }
}
Let me know if you have any doubts.