Skip to content

Instantly share code, notes, and snippets.

@mariofink
Created August 29, 2012 18:20
Show Gist options
  • Save mariofink/3516551 to your computer and use it in GitHub Desktop.
Save mariofink/3516551 to your computer and use it in GitHub Desktop.
CSS3 transforms & transitions
/**
* 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);
}
<!-- content to be placed inside <body>…</body> -->
<div class="box transition-all colorchange">
<h1>I’m a box!</h1>
</div>
{"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