Skip to content

Instantly share code, notes, and snippets.

@jklm313
Forked from anonymous/dabblet.css
Created June 22, 2012 14:29
Show Gist options
  • Save jklm313/2973064 to your computer and use it in GitHub Desktop.
Save jklm313/2973064 to your computer and use it in GitHub Desktop.
Untitled
*{margin: 0; padding: 0;}
html, body {
height: 100%
}
body {
text-align: center;
background: linear-gradient(top, white, #aeaeae);
}
pizzabox {
box-shadow: 0 0 15px aquamarine;
}
pizzabox, slice1, slice2, slice3, slice4 {
display: inline-block;
width: 200px;
height: 200px;
}
pizzabox {
position: relative;
top: 120px;
background: #222;
overflow: hidden;
}
slice1, slice2, slice3, slice4 {
position: absolute;
transform: rotate(45deg);
line-height: 200px;
color: white;
font-style: italic;
font-weight: bold;
text-shadow: 1px 1px rgba(0,0,0,.8), 0 0 10px rgba(255,255,255,.8)
}
slice1 {
background: red;
left: -199px;
}
slice2 {
background: skyblue;
right: -199px;
}
slice3 {
background: orange;
top: -199px;
left: 0;
}
slice4 {
background: tomato;
bottom: -199px;
left: 0;
}
slice1:hover, slice2:hover, slice3:hover, slice4:hover {
top: 0;
left: 0;
right: 0;
bottom: 0;
transform: rotate(0);
z-index: 9;
box-shadow: inset 0 0 155px #222;
}
<pizzabox>
<slice1>
Eenie
</slice1>
<slice2>
Meenie
</slice2>
<slice3>
Mynie
</slice3>
<slice4>
idk
</slice4>
</pizzabox>
{"view":"separate","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