Bootstrap Animated Hamburger Icon with CSS transforms. No changes to any HTML required, just add the classes. The built-in "collapsed" class on the button will take care of transformations.
Some pens around use JavaScript to toggle .collapsed
class on clicked .navbar-toggle
(AKA the hamburger) since they suppose there is a bug in Bootstrap.js that doesn't toggle that class. It seems, instead (I didn't inspect the code), that .collapsed
class is added only while using a class or an anchor name as collapsable target element. (credits: http://stackoverflow.com/a/31076793/877464)
A Pen by Giuseppe Caruso on CodePen.