Skip to content

Instantly share code, notes, and snippets.

@st3phan
Forked from jakearchibald/dabblet.css
Created March 26, 2012 09:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save st3phan/2204192 to your computer and use it in GitHub Desktop.
Save st3phan/2204192 to your computer and use it in GitHub Desktop.
Transitioning via translate (uses sub-pixel == smoother)
.test, .test2 {
width: 200px;
height: 200px;
background: green;
border-radius: 500px;
position: relative;
transition: all 2s linear;
}
.test2:hover {
transform: translate(20px, 0);
}
.test:hover {
left: 20px;
}
<div class="test"></div>
<div class="test2"></div>
{"view":"split","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment