Created
August 29, 2012 18:20
-
-
Save mariofink/3516551 to your computer and use it in GitHub Desktop.
CSS3 transforms & transitions
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
/** | |
* CSS3 transforms & transitions | |
*/ | |
body { | |
font-family: sans-serif; | |
} | |
.box { | |
background: #bada55; | |
border-radius: 1em; | |
width: 15em; | |
height: 7em; | |
margin: 5em auto; | |
} | |
.box h1 { | |
line-height: 3.5em; | |
text-align: center; | |
} | |
.transition-all { | |
transition: all 0.25s ease-in-out; | |
} | |
.colorchange:hover { | |
background: hotpink; | |
width: 20em; | |
transform: rotate(360deg) scale(2); | |
} |
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 class="box transition-all colorchange"> | |
<h1>I’m a box!</h1> | |
</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","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