Skip to content

Instantly share code, notes, and snippets.

@akashsoti
Created December 23, 2012 07:40
Show Gist options
  • Save akashsoti/4362496 to your computer and use it in GitHub Desktop.
Save akashsoti/4362496 to your computer and use it in GitHub Desktop.
@-moz-keyframes sky{
0% {background: #416f8f;}
25% {background: #7596ae;}
50% {background: #a1c3db;}
100% {background: black;}
}
@-moz-keyframes rise{
0% {background: #ffc03a;}
25% {background: #ff893a; left:500px; top:200px; bottom: 200px;}
50% {background: #ff843a; left:1000px; top:80px; bottom: 100px;}
100% {background: #ff643a; left:1500px; top:500px; bottom: 0px;}
}
#background{
position: relative;
width: 100%;
height: 600px;
background: #324350;
-animation:sky 10s;
-webkit-animation:sky 10s;
-moz-animation:sky 10s;
-webkit-animation-iteration-count: infinite;
-moz-animation-iteration-count: infinite;
}
#sun{
position: absolute;
top:530px;
left: 20px;
width: 60px;
height:60px;
overflow: hidden;
background-color: #ffc03a;
border-radius: 100px;
-animation:rise 10s linear;
-moz-animation:rise 10s linear;
-webkit-animation:rise 10s linear;
-webkit-animation-iteration-count: infinite;
-moz-animation-iteration-count: infinite;
}
@akashsoti
Copy link
Author

Simple animation to depict the sun life cycle through out the day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment