Skip to content

Instantly share code, notes, and snippets.

@eelyafi
Forked from tyv/dabblet.css
Created June 26, 2012 14:17
Show Gist options
  • Save eelyafi/2996027 to your computer and use it in GitHub Desktop.
Save eelyafi/2996027 to your computer and use it in GitHub Desktop.
внутри .frame позиционировать
.frame
{
width: 800px;
height: 400px;
border-radius: 30px;
position: relative;
background-image: linear-gradient(bottom, #f5f5e0 0, #8ccdec 100%);
outline: 0;
transition: height 0.3s linear;
}
.front, .center, .back
{
position: absolute;
opacity: 0.5;
border-radius: 40px;
transition: left 0.3s ease;
}
.front
{
top: 15%;
left: 15%;
width: 200px;
height: 200px;
background: rgba(255, 255, 255, 0.75);
z-index: 3;
}
.center
{
abackground: rgba(255, 255, 255, 0.5);
z-index: 2;
top: 35%;
left: 45%;
width: 150px;
height: 100px;
box-shadow: inset 0 0 80px rgba(255,255,255,0.85), 0 0 40px #fff;
}
.back
{
abackground: rgba(255, 255, 255, 0.25);
top: 55%;
left: 5%;
width: 65px;
height: 45px;
box-shadow: inset 0 0 80px rgba(255, 255, 255, 0.25), 0 0 40px #fff;
z-index: 1;
}
.frame:focus .front
{
left: 55%;
}
.frame:focus .center
{
left: 40%;
}
.frame:focus .back
{
left: 15%;
}
/*
внутри .frame позиционировать
блоки на разных слоях
(по имени класса понятно каких)
по клику на .frame изменять с
анимацией.
у каждого блока позицию.
по клику вне .frame
возвращать назад
http://clck.ru/d/GiIRzL3l145IH
*/
<div class="frame" tabindex="1">
<div class="front"></div>
<div class="center"></div>
<div class="back"></div>
</div>
{"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