#wrapper
#t
#y
#k
#h
#o <!-- Didn't use -->
View Compiled
*,*:before,*:after{ box-sizing: border-box; } html, body { width: 100%; height: 100%;}
%pseudo{
content:'';
display: block;
position: absolute;
}
%ab-center{
top: 0; bottom: 0; right: 0; left: 0;
margin: auto;
}
$color-base: #EAEAE8;
html{
background: #e4e4e2;
}
*:before,
*:after{
@extend %pseudo;
}
#wrapper{
position: absolute;
@extend %ab-center;
width: 448px;
height: 250px;
}
// Body
#t{
position: absolute;
top: 0;
left: 0;
width: inherit;
height: inherit;
border-radius: 24px;
background: #e4e4e2;
box-shadow: 41px 25px 82px #c9c9c7,
-41px -25px 82px #fffffd;
// Buttons
&:before,
&:after{
width: 38px;
height: 38px;
border-radius: 50%;
bottom: 70px;
box-shadow:
inset 1px 1px 2px 0 rgba(255,255,255,0.8),
4px 4px 10px #b6b6b5,
-4px -4px 10px #ffffff;
background: linear-gradient(145deg, #cdcdcb, #f4f4f2);
}
&:before{
right: 54px;
}
&:after{
right: 110px;
}
}
// Speaker
#y{
position: absolute;
bottom: 22px;
left: 30px;
width: 206px;
height: 206px;
border-radius: 50%;
background: $color-base;
box-shadow:
0 0 0 1px rgba(255,255,255,0.8),
5px 5px 16px #c0c0be,
-5px -5px 16px #ffffff;
&:before{
@extend %ab-center;
width: 176px;
height: 176px;
border-radius: inherit;
background-image:
radial-gradient(#848793 20%, transparent 40%);
background-position: 2.5px 2.5px;
background-size: 9px 9px;
transform: rotate(45deg);
}
&:after{
@extend %ab-center;
width: 178px;
height: 178px;
border-radius: inherit;
box-shadow:
inset 10px 10px 20px rgba(0,0,0,0.15),
inset -4px -4px 2px rgba(255,255,255,0.6);
}
}
// Pad
#k{
width: 38px;
height: 10px;
position: absolute;
bottom: 138px;
right: 54px;
border-radius: 5px;
box-shadow:
inset 1px 1px 2px 0 rgba(255,255,255,0.8),
4px 4px 10px #b6b6b5,
-4px -4px 10px #ffffff;
&:before{
@extend %pseudo;
width: 10px;
height: 38px;
left: 14px;
top: -14px;
border-radius: inherit;
background: $color-base;
box-shadow: inherit;
}
&:after{
@extend %pseudo;
width: inherit;
height: inherit;
border-radius: inherit;
background: $color-base;
}
}
#h{
width: 38px;
height: 10px;
border-radius: 5px;
position: absolute;
bottom: 138px;
right: 112px;
box-shadow:
inset 1px 1px 2px 0 rgba(255,255,255,0.8),
4px 4px 10px #b6b6b5,
-4px -4px 10px #ffffff;
background: $color-base;
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.