Created
May 11, 2014 19:06
-
-
Save vasilisvg/469fd663a8d8c8781dda to your computer and use it in GitHub Desktop.
CSS animations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* CSS animations | |
*/ | |
@keyframes rotate { | |
from { | |
transform: rotate(0deg); | |
} | |
to { | |
transform: rotate(360deg); | |
} | |
} | |
div { | |
width: 5em; | |
height: 5em; | |
margin: 3em; | |
background: red; | |
transform-origin: ; | |
} | |
div:hover { | |
animation: rotate 1s /* .2s infinite ease-in-out alternate */ | |
} | |
@keyframes change-background { | |
from { | |
background: hsl(0, 50%, 50%); | |
} | |
16% { | |
background: hsl(60, 50%, 50%); | |
} | |
33% { | |
background: hsl(120, 50%, 50%); | |
} | |
50% { | |
background: hsl(180, 50%, 50%); | |
} | |
66% { | |
background: hsl(240, 50%, 50%); | |
} | |
83% { | |
background: hsl(300, 50%, 50%); | |
} | |
to { | |
background: hsl(0, 50%, 50%); | |
} | |
} | |
body { | |
//animation: change-background 60s infinite; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- content to be placed inside <body>…</body> --> | |
<div></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// alert('Hello world!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment