.polaroid
.button
.polaroid-body-bottom
.slot
.picture
.frame
.face
.mouth
.tongue
.eyes
.left-eye
.right-eye
.polaroid-body-top
.lens
.lens-reflections
.blinker
.thingy
.flash
.flash-reflections
.stripes
.divider
View Compiled
$blue: #2e90d6;
$light: white;
$dark: #2e4155;
$orange: #eb4c15;
$yellow: #f0c10e;
html,
body {
height: 100%;
width: 100%;
overflow: hidden;
padding: 0;
margin: 0;
background-color: $blue;
}
html {
box-sizing: border-box;
}
*,
*:before,
*:after {
box-sizing: inherit;
position: absolute;
}
*:before,
*:after {
content: "";
}
.polaroid {
width: 460px;
height: 350px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.button {
width: 30%;
height: 7%;
background-color: $dark;
left: 35%;
top: 3%;
border-radius: 5px 5px 0 0;
animation: button-press 5s linear infinite;
}
@keyframes button-press {
0% {
top: 3%;
}
5% {
top: 9%;
}
10% {
top: 3%;
}
}
.polaroid-body-top {
height: 70%;
width: 90%;
left: 5%;
top: 10%;
border-radius: 15px 15px 0 0;
background-color: $light;
z-index: 2;
&:before {
border-radius: 15px 15px 0 0;
width: 100%;
height: 40px;
background-color: darken($light, 8%);
}
}
.lens {
border-radius: 50%;
width: 140px;
height: 140px;
background-color: $dark;
left: 137px;
top: 35px;
border: 25px solid darken($dark, 7%);
z-index: 3;
&:before {
width: 80%;
height: 80%;
background-color: $dark;
border-radius: 50%;
left: 10%;
top: 10%;
border: 20px solid darken($dark, 7%);
animation: aperture 5s linear infinite;
}
}
.lens-reflections {
border-radius: 50%;
width: 17px;
height: 17px;
background-color: rgba(255, 255, 255, 0.3);
bottom: 110px;
z-index: 99;
right: 177px;
&:before {
border-radius: 50%;
width: 17px;
height: 17px;
background-color: rgba(255, 255, 255, 0.3);
bottom: 31px;
right: 15px;
}
&:after {
border-radius: 50%;
width: 4px;
height: 4px;
background-color: rgba(255, 255, 255, 0.3);
bottom: 19px;
right: 36px;
}
}
.flash {
width: 45px;
height: 45px;
background-color: darken($light, 20%);
right: 15px;
top: 15px;
border-radius: 5px;
&:before {
width: 80%;
height: 80%;
border-radius: 50%;
background-color: darken($dark, 7%);
left: 10%;
top: 10%;
}
&:after {
width: 50%;
height: 50%;
border-radius: 50%;
background-color: $dark;
left: 25%;
top: 25%;
}
}
.flash-reflections {
z-index: 99;
border-radius: 50%;
width: 10px;
height: 10px;
background-color: rgba(255, 255, 255, 0.3);
top: 10px;
right: 10px;
&:before {
border-radius: 50%;
width: 3px;
height: 3px;
background-color: rgba(255, 255, 255, 0.3);
top: 10px;
right: 10px;
}
&:after {
z-index: 99;
top: 12.5px;
left: -2px;
width: 0px;
height: 0px;
border-radius: 50%;
background-color: white;
opacity: 0;
transform: translate(-50%, -50%);
animation: flash 5s linear infinite;
}
}
@keyframes flash {
30% {
opacity: 0.6;
width: 0px;
height: 0px;
}
32% {
opacity: 0.6;
}
34% {
height: 500px;
width: 500px;
opacity: 0;
}
}
@keyframes aperture {
31% {
border-width: 20px;
}
32% {
border-width: 36px;
}
34% {
border-width: 20px;
}
}
.thingy {
border-radius: 3px;
width: 60px;
height: 15px;
background-color: $dark;
top: 90px;
left: 40px;
}
.blinker {
background-color: $orange;
width: 25px;
height: 25px;
left: 60px;
top: 120px;
border-radius: 50%;
box-shadow: 0px 0px 0px 3px rgba(0, 0, 0, 0.15);
border: 2px solid darken($orange, 10%);
animation: blinker 5s linear infinite;
}
@keyframes blinker {
13%,
17%,
21%,
25% {
background-color: $orange;
border: 2px solid darken($orange, 10%);
}
15%,
19%,
23% {
background-color: lighten($orange, 20%);
border: 2px solid $orange;
}
}
.polaroid-body-bottom {
height: 20%;
width: 90%;
background-color: $dark;
bottom: 0;
left: 5%;
border-radius: 0 0 8px 8px;
&:before,
&:after {
background-color: $dark;
width: 25px;
height: 100%;
bottom: 8px;
}
&:before {
transform: rotate(-19deg);
left: -12px;
}
&:after {
transform: rotate(19deg);
right: -12px;
}
}
.divider {
width: 100%;
height: 26px;
background-color: $light;
bottom: 20%;
z-index: 2;
&:before {
left: 12.5px;
width: 94.6%;
height: 19px;
background-color: darken($light, 7%);
bottom: 23.9px;
transform: perspective(100px) rotateX(35deg);
}
&:after {
height: 17px;
bottom: 27px;
width: 75px;
box-shadow: 25px 0px 0px 0px darken($orange, 10%) inset,
50px 0px 0px 0px darken($yellow, 10%) inset,
75px 0px 0px 0px darken($blue, 10%) inset;
left: 192.5px;
transform: perspective(12px) rotateX(23deg);
}
}
.stripes {
height: 20%;
width: 60px;
box-shadow: 20px 0px 0px 0px $orange inset, 40px 0px 0px 0px $yellow inset,
60px 0px 0px 0px $blue inset;
left: 177px;
top: 168px;
z-index: 2;
}
.slot {
width: 70%;
height: 25%;
background-color: darken($dark, 7%);
left: 15%;
bottom: 45%;
border-radius: 5px;
&:before {
width: 100%;
height: 50%;
border-radius: 5px 5px 0 0;
background-color: darken($dark, 7%);
z-index: 3;
}
&:after {
z-index: 2;
width: 100%;
height: 23px;
background-color: $dark;
top: -22px;
}
}
.picture {
opacity: 0;
z-index: 1;
left: 107px;
width: 200px;
height: 260px;
background-color: $light;
bottom: 50px;
border-radius: 5px;
box-shadow: 5px 5px 0px 0px rgba(0, 0, 0, 0.4);
animation: photo 5s ease infinite;
}
@keyframes photo {
37% {
opacity: 1;
}
38% {
opacity: 1;
bottom: 50px;
z-index: 1;
}
65% {
bottom: -220px;
z-index: 1;
}
75% {
bottom: -220px;
z-index: 99;
}
80% {
bottom: -170px;
opacity: 1;
}
85% {
bottom: -700px;
opacity: 1;
}
86% {
opacity: 0;
}
}
.frame {
filter: brightness(0);
width: 180px;
height: 180px;
background-color: $blue;
top: 10px;
left: 50%;
border-radius: 5px;
transform: translateX(-50%);
animation: fade-in 5s linear infinite;
}
@keyframes fade-in {
45% {
filter: brightness(0);
}
75% {
filter: brightness(1);
}
100% {
filter: brightness(1);
}
}
.face {
width: 140px;
height: 140px;
border-radius: 50%;
background-color: $yellow;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
box-shadow: inset -5px -5px 0px darken($yellow, 10%);
}
.mouth {
border-radius: 0 0 50% 50%;
background-color: $dark;
width: 70px;
height: 35px;
left: 50%;
transform: translateX(-50%);
bottom: 20px;
border-radius: 10px 10px 150px 150px;
border: 5px solid $dark;
overflow: hidden;
}
.eyes {
width: 70px;
height: 30px;
left: 50%;
transform: translateX(-50%);
top: 35px;
}
.left-eye,
.right-eye {
width: 25px;
height: 30px;
background-color: $dark;
border-radius: 50%;
&:before {
width: 10px;
height: 12px;
background-color: $yellow;
border-radius: 50%;
}
}
.right-eye {
right: 0;
}
.tongue {
background-color: $orange;
width: 40px;
height: 35px;
left: 50%;
transform: translateX(-50%);
top: 13px;
border-radius: 50%;
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.