Created
May 1, 2012 22:31
-
-
Save marek-saji/2571980 to your computer and use it in GitHub Desktop.
card swap
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
/** | |
* card swap | |
*/ | |
.a | |
{ | |
border : #6f6 solid; | |
animation : a 10s infinite; | |
z-index : 1; | |
} | |
.b | |
{ | |
border : #f66 solid; | |
animation : b 10s infinite; | |
z-index : 2; | |
} | |
.a, | |
.b | |
{ | |
position : absolute; | |
top : 0; | |
background-color : white; | |
font : 4em/2em sans; | |
text-align : center; | |
width : 2em; | |
height : 2em; | |
} | |
@keyframes a | |
{ | |
25% { | |
transform : translateY(0); | |
z-index : 2; | |
} | |
32.5% { | |
transform : translateY(-1.25em); | |
z-index : 1; | |
} | |
50% { | |
transform : translateY(0); | |
z-index : 1; | |
} | |
75% { | |
transform : translateY(-1.25em); | |
z-index : 2; | |
} | |
100% { | |
transform : translateY(0); | |
z-index : 2; | |
} | |
} | |
@keyframes b | |
{ | |
25% { | |
transform : translateY(0); | |
z-index : 1; | |
} | |
32.5% { | |
transform : translateY(1.25em); | |
z-index : 2; | |
} | |
50% { | |
transform : translateY(0); | |
z-index : 2; | |
} | |
75% { | |
transform : translateY(1.25em); | |
z-index : 1; | |
} | |
100% { | |
transform : translateY(0); | |
z-index : 1; | |
} | |
} |
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="a">A</div> | |
<div class="b">B</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
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment