Created
February 12, 2014 20:44
-
-
Save maxxcrawford/8964119 to your computer and use it in GitHub Desktop.
CSS Transform/Animation Scale Example ( http://jsfiddle.net/aNX9h )
This file contains hidden or 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
<!doctype html> | |
<html> | |
<head> | |
<title>CSS animations: Example 1</title> | |
<style type="text/css"> | |
body { | |
padding: 20px; | |
} | |
.contain { | |
width: 50px ; | |
height: 50px; | |
} | |
.circle { | |
background: red; | |
animation: rotate 1s linear 0s infinite alternate; | |
-moz-animation: rotate 1s linear 0s infinite alternate; | |
-ms-animation: rotate 1s linear 0s infinite alternate; | |
-webkit-animation: rotate 1s linear 0 infinite alternate; | |
width: 100%; | |
height: 100%; | |
line-height: 100%; | |
border-radius: 50%; | |
} | |
@keyframes rotate { | |
from { transform: scale( 1 ); } | |
to { transform: scale( 1.2 ); } | |
} | |
@-moz-keyframes rotate { | |
from { -moz-transform: scale( 1 ); } | |
to { -moz-transform: scale( 1.2 ); } | |
} | |
@-ms-keyframes rotate { | |
from { -ms-transform: scale( 1 ); } | |
to { -ms-transform: scale( 1.2 ); } | |
} | |
@-webkit-keyframes rotate { | |
from { -webkit-transform: scale( 1 ); } | |
to { -webkit-transform: scale( 1.2 ); } | |
} | |
</style> | |
</head> | |
<body> | |
<div class="contain"><div class="circle"></div></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment