Skip to content

Instantly share code, notes, and snippets.

@mightymess
Created April 25, 2012 13:37
Show Gist options
  • Save mightymess/2489760 to your computer and use it in GitHub Desktop.
Save mightymess/2489760 to your computer and use it in GitHub Desktop.
Untitled
.button, .topButton{
position:absolute;
border-radius:0;
width:300px;
height:300px;
overflow:hidden;
}
.topButton{
background:#333;
z-index:2;
transition: all 0.2s ease-in-out;
}
.button:hover .topButton{
transform:translate(0, -300px);
}
.pannel{
background:#666;
width: 300px;
display:block;
height:300px;
border-radius:150px;
border:solid 1px #333;
position:absolute;
transition: all 0.8s ease-in-out;
}
.button:hover .pannel.top{
transform-origin:right center;
transform: rotate(-180deg);
}
.button:hover .pannel.right{
transform-origin:center bottom;
transform: rotate(-180deg);
}
.button:hover .pannel.bottom{
transform-origin:left center;
transform: rotate(-180deg);
}
.button:hover .pannel.left{
transform-origin:center top;
transform: rotate(-180deg);
}
.pannel.left{
left:-150px;
top:0;
}
.pannel.right{
right:-150px;
top:0;
}
.pannel.top{
top:-150px;
}
.pannel.bottom{
bottom:-150px;
}
<!-- content to be placed inside <body>…</body> -->
<div class="button">
<div class="topButton">&nbsp;</div>
<div class="pannel top">&nbsp;</div>
<div class="pannel right">&nbsp;</div>
<div class="pannel bottom">&nbsp;</div>
<div class="pannel left">&nbsp;</div>
<a href="#" class="roundBt">text</a>
</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