<div class="phone">
<input type="radio" name="s" id="s1">
<input type="radio" name="s" id="s2" checked="checked">
<input type="radio" name="s" id="s3">
<label for="s1"><img src="http://co0kie.github.io/codepen/mobile-nav/facebook.svg" alt=""></label>
<label for="s2"><img src="http://co0kie.github.io/codepen/mobile-nav/twitter.svg" alt=""></label>
<label for="s3"><img src="http://co0kie.github.io/codepen/mobile-nav/instagram.svg" alt=""></label>
<div class="circle"></div>
<div class="phone_content">
<div class="phone_bottom">
<span class="indicator"></span>
</div>
</div>
</div>
.phone{
width: 320px;
height: 260px;
margin: auto;
display: flex;
align-items: flex-end;
position: relative;
justify-content: center;
&::before{
content: '';
position: absolute;
width: 84%;
height: 0px;
bottom: -10px;
box-shadow: 0 0 25px 9px rgba(255, 0, 0, 0.33), 50px 10px 25px 8px rgba(18, 255, 0, 0.33), -40px 8px 25px 9px rgba(242, 255, 0, 0.33);
left: 0;
right: 0;
margin: auto;
}
&::after{
content: '';
}
&_content{
filter: contrast(20);
width: 100%;
background-color: white;
overflow: hidden;
position: absolute;
}
&_bottom{
width: 100%;
height: 66px;
background: black;
display: flex;
justify-content: center;
filter: blur(10px);
}
}
input{
display: none;
}
label{
cursor: pointer;
display: flex;
width: 33%;
height: 66px;
position: relative;
z-index: 2;
align-items: center;
justify-content: center;
> img{
width: 25px;
top: 0;
bottom: 0;
margin: auto;
position: absolute;
z-index: 3;
transition: 200ms 100ms cubic-bezier(.14,-0.08,.74,1.4);
}
&::before{
content: '';
position: absolute;
}
}
.circle{
width: 60px;
height: 60px;
background: black;
position: absolute;
top: 152px;
z-index: 1;
border-radius: 50%;
left: 0;
right: 0;
margin: auto;
transition: 200ms cubic-bezier(.14,-0.08,.74,1.4);
box-shadow: 0px 82px 20px 0px rgba(128, 128, 128, 0.29);
}
.indicator{
width: 70px;
height: 70px;
background-image: linear-gradient(0deg, rgb(247, 176, 176), rgba(183, 255, 154, 0)), linear-gradient(0deg, rgba(158, 255, 151, 0.75), rgba(183, 255, 154, 0)), linear-gradient(0deg, rgb(180, 255, 251), rgba(183, 255, 154, 0));
background-size: cover;
background-position: 0 10px;
border-radius: 50%;
position: absolute;
left: 0;
top: -42px;
right: 0;
margin: auto;
transition: 200ms cubic-bezier(.14,-0.08,.74,1.4);
}
#s1{
&:checked{
~ [for="s1"] > img{
top: -85px;
}
~ .circle,
~ div div .indicator{
left: -66%;
}
}
}
#s2{
&:checked{
~ [for="s2"] > img{
top: -85px;
}
~ .circle,
~ div div .indicator{
left: 0;
}
}
}
#s3{
&:checked{
~ [for="s3"] > img{
top: -85px;
}
~ .circle,
~ div div .indicator{
left: 66%;
}
}
}
View Compiled
// www.jerecho.com
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.