Skip to content

Instantly share code, notes, and snippets.

@lyonsun
Created December 24, 2014 08:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lyonsun/c77b4f0fe0dcdb688275 to your computer and use it in GitHub Desktop.
Save lyonsun/c77b4f0fe0dcdb688275 to your computer and use it in GitHub Desktop.
css3 animation.
.movable
{
/*width:60px;
height:40px;*/
background:#FF6560;
/*color:#ffffff;*/
position:relative;
font-weight:bold;
font-size:20px;
padding:10px;
animation:movable 5s 1;
-moz-animation:movable 5s 1;
-webkit-animation:movable 5s 1;
-o-animation:movable 5s 1;
border-radius:5px;
-webkit-border-radius:5px;
}
@keyframes movable
{
0% {transform: rotate(0deg);left:-1500px;}
50% {transform: rotate(180deg);left:0px;}
100% {transform: rotate(-360deg);left:0px;}
}
@-webkit-keyframes movable
{
0% {-webkit-transform: rotate(0deg);left:-1500px;}
50% {-webkit-transform: rotate(180deg);left:0px;}
100% {-webkit-transform: rotate(-360deg);left:0px;}
}
@-moz-keyframes movable
{
0% {-moz-transform: rotate(0deg);left:-1500px;}
50% {-moz-transform: rotate(180deg);left:0px;}
100% {-moz-transform: rotate(-360deg);left:0px;}
}
@-o-keyframes movable
{
0% {transform: rotate(0deg);left:-1500px;}
50% {transform: rotate(180deg);left:0px;}
100% {transform: rotate(-360deg);left:0px;}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment