Skip to content

Instantly share code, notes, and snippets.

@rmariuzzo
Created November 14, 2013 19:29
Show Gist options
  • Save rmariuzzo/7472851 to your computer and use it in GitHub Desktop.
Save rmariuzzo/7472851 to your computer and use it in GitHub Desktop.
Keyframes. Create a named animation sequence that can be applied to elements later.
/**
* Keyframes.
* Create a named animation sequence that can be applied to elements later.
*
* Usage:
* @include keyframes(fly) {
* from {
* transform: rotate(0deg);
* }
* to {
* transform: rotate(360deg);
* }
* }
*/
@mixin keyframes($name) {
@-moz-keyframes #{$name} {
@content;
}
@-webkit-keyframes #{$name} {
@content;
}
@-o-keyframes #{$name} {
@content;
}
@-ms-keyframes #{$name} {
@content;
}
@-khtml-keyframes #{$name} {
@content;
}
@keyframes #{$name} {
@content;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment