Created
September 25, 2015 18:23
-
-
Save DavidWells/1f977cc310feb1264b41 to your computer and use it in GitHub Desktop.
Example of how to use keyframes in webpack with css-loader + postcss
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
:global { | |
.test { | |
position: absolute; | |
width:30px; | |
height:30px; | |
background: red; | |
display: block; | |
left:0px; | |
&:hover{ | |
transform: rotateY(0deg); | |
animation: expand 1s ease-in-out forwards; | |
} | |
} | |
} | |
/* correct keyframe syntax */ | |
@keyframes :global(expand) { | |
0% { | |
width: 10px; | |
left:0px; | |
} | |
25% { | |
left:25%; | |
} | |
50% { | |
left:50%; | |
} | |
100% { | |
width: 30px; | |
left:100%; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment