Created
January 10, 2012 08:02
-
-
Save oli/1587754 to your computer and use it in GitHub Desktop.
CSS Animations test: multiple keyframes, shorthand
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 test: multiple keyframes, shorthand */ | |
.box { | |
width: 250px; | |
height: 80px; | |
margin: 24px; | |
border: 5px solid #999; | |
border-radius: 5px; | |
padding: 3px; | |
} | |
@keyframes multiple { | |
33.3% {background-color: hsl(0,80%,80%);} | |
66.7% {background-color: hsl(180,80%,80%);} | |
} | |
@keyframes size {50% {font-size: 200%;}} | |
.wrapper:hover .multiple {animation: multiple 5s linear;} | |
.wrapper:hover .size { | |
animation-name: multiple, size; | |
animation-duration: 5s; | |
animation-timing-function: linear; | |
} | |
.wrapper:hover .both {animation: multiple 5s linear, size 5s linear;} |
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
<div class="wrapper"> | |
<div class="box multiple">multiple</div> | |
<div class="box multiple size">multiple, size (individual)</div><!-- testing class overwriting --> | |
<div class="box both">multiple, size (shorthand)</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
{"version":"1.1","settings":{"prefixfree":"1"},"view":[{"template":"r\nc","active":true,"seethrough":false},{"template":"r\nh","active":false,"seethrough":false},{"template":"r\nch","active":false,"seethrough":false}]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment