Created
April 5, 2012 10:47
-
-
Save gnclmorais/2309910 to your computer and use it in GitHub Desktop.
CSS3 Orbital Avatar
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 Orbital Avatar | |
*/ | |
.demo { | |
position: absolute; | |
top: 150px; | |
right: 200px; | |
} | |
.avatar { | |
width: 100px; | |
height: 100px; | |
background-image: url('http://www.mozilla.org/img/covehead/firefox/brand-toolkit/identity-channel-aurora.png'); | |
background-size: cover; | |
background-repeat: no-repeat; | |
background-position: center; | |
border-radius: 50px; | |
} | |
.orbit:before { | |
content: ""; | |
display: block; | |
width: 150px; | |
height: 150px; | |
position: relative; | |
top: -28px; | |
left: -28px; | |
border: 3px solid #333; | |
border-radius: 78px; | |
} | |
.orbit:after { | |
content: ""; | |
display: block; | |
width: 30px; | |
height: 30px; | |
position: relative; | |
top: -175px; | |
left: -19px; | |
background-color: black; | |
border-radius: 15px; | |
animation: rotation 15s linear infinite; | |
} | |
@keyframes rotation { | |
0% { transform: rotate(0deg); transform-origin: 69px 69px; } | |
100% { transform: rotate(360deg); transform-origin: 69px 69px; } | |
} |
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
<div class="demo avatar orbit"></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":"separate","seethrough":"1","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment