css - LESS animation keyframes mixin combined with transform -
i have this:
@-webkit-keyframes anim1{ 0%, 100% { -webkit-transform: rotatez(0) } 30% { -webkit-transform: rotatez(20deg) } } @-moz-keyframes anim1{ 0%, 100% { -moz-transform: rotatez(0) } 30% { -moz-transform: rotatez(20deg) } } @keyframes anim1{ 0%, 100% { transform: rotatez(0) } 30% { transform: rotatez(20deg) } }
and use this:
.icon { -webkit-animation: anim1 1s forwards; -moz-animation: anim1 1s forwards; animation: anim1 1s forwards; }
is there way create mixin out of ? found examples not including transform (which has 3 states default, moz, webkit), using simple css opacity , easy that.
you can try using cross browser animation mixin, like:
@mixin keyframes($animation-name) { @-webkit-keyframes #{$animation-name} { @content; } @-moz-keyframes #{$animation-name} { @content; } @-ms-keyframes #{$animation-name} { @content; } @-o-keyframes #{$animation-name} { @content; } @keyframes #{$animation-name} { @content; } }
hope want achieve.
hope helps!
Comments
Post a Comment