Skip to content

Instantly share code, notes, and snippets.

@HerringtonDarkholme
Created November 15, 2013 16:27
Show Gist options
  • Save HerringtonDarkholme/7487220 to your computer and use it in GitHub Desktop.
Save HerringtonDarkholme/7487220 to your computer and use it in GitHub Desktop.
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
html {
background: #f06;
background: linear-gradient(-45deg, #bd9999,#282828);
min-height: 100%;
}
.container {
position: relative;
}
.btn {
z-index: 2;
display: block;
outline: 0;
width: 288px;
height: 288px;
position: fixed;
top: 50%;
left: -45px;
transform: translateY(-50%);
border-radius: 100%;
background: linear-gradient(180deg, #c8c8c8, #ffffff);
}
.btn-inner {
margin: 16px;
width: 256px;
height: 256px;
border-radius: 100%;
background: linear-gradient(0deg, #e9e9e9, #ffffff);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.btn-inner:active {
background: linear-gradient(180deg, #e9e9e9, #ffffff);
box-shadow: 0 0 6px rgba(0, 0, 0, 0.5) inset, 0 5px 15px rgba(0, 0, 0, 0.2);
}
.btn-inner i.fa {
margin: 75px;
color: #a09b98;
font-size: 100px;
}
.btn-inner:active i.fa {
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
transform: scale(0.99);
}
.radial {
width: 642px;
height: 642px;
background: rgba(0, 0, 0, 0.1);
border-radius: 100%;
overflow: hidden;
position: fixed;
left: -254px;
top: 50%;
transform: translateY(-50%) scale(0.01);
transition: all 0.5s ease-in-out;
}
.btn:focus+.radial {
transform: scale(1) translateY(-50%);
}
.item {
width: 321px;
height: 321px;
position: absolute;
top: 0;
border-right: 2px dashed #d8d5dc;
transform-origin: 100% 100%;
transition: all 0.2s ease-out;
}
.item:nth-child(1) {
transform: rotate(30deg);
}
.item:nth-child(2) {
transform: rotate(90deg) skewY(30deg);
}
.item:nth-child(3) {
transform: rotate(150deg) skewY(30deg);
}
.item:nth-child(4) {
transform: rotate(240deg);
}
.item>h1 {
display: inline-block;
float: right;
transform: rotate(-15deg);
color: white;
font-weight: bold;
text-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
font-smoothing: antialiased;
transition: all 0.2s ease-out;
}
.item:hover {
background: rgba(90, 192, 255, 0.8);
text-shadow: 0 0 2px rgba(190, 122, 255, 0.1);
}
.item:hover>h1 {
color: #056bd8;
}
h1.fa {
font-size: 50px;
}
.item:nth-child(1)>h1{
transform: rotate(-30deg) translate(-80%, -50%);
}
.item:nth-child(2)>h1{
transform: skewY(-30deg) rotate(-30deg) translate(-130%, -10%);
}
.item:nth-child(3)>h1{
transform: skewY(-30deg) rotate(-30deg) translate(-100%, 0);
}
.item:nth-child(4)>h1{
transform: rotate(-70deg) translate(-220%, -320%);
}
.item:nth-child(1)>h1.fa{
transform: rotate(-30deg) translate(-20%, 150%);
}
.item:nth-child(2)>h1.fa{
transform: skewY(-30deg) rotate(-30deg) translate(-130%, 250%);
}
.item:nth-child(3)>h1.fa{
transform: skewY(-30deg) rotate(-30deg) translate(-100%, 260%);
}
.item:nth-child(4)>h1.fa{
transform: rotate(-70deg) translate(-300%, -10%);
}
<!-- content to be placed inside <body>…</body> -->
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<div class='container'>
<a class='btn' tabindex='1' role='button'>
<div class='btn-inner'>
<i class="fa"></i>
</div>
</a>
<ul class='radial'>
<li class='item'>
<h1>Preview</h1>
<h1 class='fa'></h1>
</li>
<li class='item'>
<h1>Close</h1>
<h1 class='fa'></h1>
</li>
<li class='item'>
<h1>Setting</h1>
<h1 class='fa'></li>
<li class='item'>
<h1>Photo</h1>
<h1 class='fa'></h1>
</li>
</ul>
</div>
// alert('Hello world!');
{"view":"split-vertical","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