Created
October 3, 2013 14:30
-
-
Save distinctgrey/6810806 to your computer and use it in GitHub Desktop.
Dabblet - Hover effect #1
This file contains hidden or 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
/** | |
* Dabblet - Hover effect #1 | |
*/ | |
* { | |
box-sizing: border-box; | |
} | |
:root { | |
/* background pattern: http://subtlepatterns.com/triangular/ */ | |
background: #eee url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8AgMAAABHkjHhAAAADFBMVEW3t72zs7q4uL66usDztsWmAAAAgUlEQVR4AV3HoZUCAQxF0TWLob6JSQeY3xclYNIXJpzDMOK96+7fz//xVXrr0Yev5VuPPnwt33r04Wv51qMPX8u3Hn34Wr716MPX8q1HH/62/P36cXo8T9dffL351qMPX8u3Hn34Wr716MPX8q1HH76Wbz368LV869GHr+Vbjz78B9UMtIcMXHm1AAAAAElFTkSuQmCC') top left; | |
margin: 2em 0; | |
font-family: Futura; | |
font-weight: bold; | |
text-transform: uppercase; | |
font-size: 4em; | |
} | |
.circle { | |
overflow: hidden; | |
display: block; | |
position: relative; | |
width: 6em; | |
height: 6em; | |
margin: 0 auto; | |
line-height: 6em; | |
cursor: pointer; | |
text-align: center; | |
border-radius: 999em; | |
background: #0099cc; | |
box-shadow: none; | |
color: #fff; | |
/*text-shadow: 0 0 2px #056495;*/ | |
transition: box-shadow .5s linear, transform .5s linear; | |
} | |
.circle:hover { | |
box-shadow: inset 0 0 0 0.5em #056495, | |
inset 0 0 0 .6em #0099cc, | |
inset 0 0 0 .63em #056495; | |
transform: rotate(360deg); | |
} | |
.circle:before, | |
.circle:after { | |
content: ''; | |
width: 0; | |
height: .2em; | |
background: #fff; | |
position:absolute; | |
margin-left: 0; | |
left: 50%; | |
transition: width .5s linear .6s, | |
margin-left .5s linear .6s; | |
} | |
.circle:before { | |
box-shadow: 0 -.3em 0 -.08em #fff; | |
top: 1.8em; /* 2em - el height */ | |
} | |
.circle:after { | |
top: 4em; | |
box-shadow: 0 .3em 0 -.08em #fff; | |
} | |
.circle:hover:before, | |
.circle:hover:after { | |
width: 100%; | |
margin-left: -50%; | |
} |
This file contains hidden or 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
<a class="circle">Dabblet</a> |
This file contains hidden or 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
// alert('Hello world!'); |
This file contains hidden or 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-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment