Skip to content

Instantly share code, notes, and snippets.

@jankorbel
Forked from LeaVerou/dabblet.css
Created June 2, 2012 19:23
Show Gist options
  • Save jankorbel/2859645 to your computer and use it in GitHub Desktop.
Save jankorbel/2859645 to your computer and use it in GitHub Desktop.
Move in a circle without wrapper elements
/**
* Move in a circle without wrapper elements
* Idea by Aryeh Gregor, simplified by Lea Verou
*/
@keyframes rot {
from {
transform: rotate(0deg)
translate(-150px)
rotate(0deg);
}
to {
transform: rotate(360deg)
translate(-150px)
rotate(-360deg);
}
}
.smile {
width: 40px;
height: 40px;
position: absolute;
top: 200px;
left: 50%;
margin: -20px;
font-size: 100px;
animation: 3s rot infinite linear;
}
<div class="smile">☺</div>
{"view":"separate","fontsize":"100","seethrough":"","prefixfree":"1","page":"result"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment