Stanley "Stan" Marsh created with CSS3.
A Pen by Radimir Bitsov on CodePen.
| <section class="container"> | |
| <div id="stan"> | |
| <div class="head"> | |
| <div class="hat"> | |
| <div class="hat-l-side"></div> | |
| <div class="hat-r-side"></div> | |
| <div class="hat-top-1"></div> | |
| <div class="hat-top-2"></div> | |
| <div class="hat-top-3"></div> | |
| <div class="hat-top-4"></div> | |
| <div class="hat-top-5"></div> | |
| <div class="hat-top-6"></div> | |
| <div class="hat-top-7"></div> | |
| <div class="hat-top-8"></div> | |
| </div> | |
| <div class="left-eye"> | |
| <div class="eyelid-top"></div> | |
| <div class="eyelid-bottom"></div> | |
| </div> | |
| <div class="right-eye"> | |
| <div class="eyelid-top"></div> | |
| <div class="eyelid-bottom"></div> | |
| </div> | |
| <div class="mouth"></div> | |
| </div> | |
| </div> | |
| </section> |
Stanley "Stan" Marsh created with CSS3.
A Pen by Radimir Bitsov on CodePen.
| @import "compass/css3"; | |
| $skin-color: #FFE3C6; | |
| $hat-color: #3151a5; | |
| $hat-color2: #e70000; | |
| .container{ } | |
| #stan { | |
| top: 50px; | |
| left: 50px; | |
| margin: 0 auto; | |
| position: relative; | |
| height: 270px; | |
| width: 300px; | |
| * { | |
| position: absolute; | |
| } | |
| .head { | |
| top: 20px; | |
| width: 220px; | |
| height: 220px; | |
| background: $skin-color; | |
| border-radius: 50%; | |
| } | |
| .hat { | |
| top: 0; | |
| width: 220px; | |
| height: 110px; | |
| background: $hat-color; | |
| border-radius: 220px 220px 0 0; | |
| &:after { | |
| content: ""; | |
| position: absolute; | |
| top: 87px; | |
| width: 218px; | |
| height: 60px; | |
| border-radius: 218px / 50px; | |
| background: $skin-color; | |
| box-shadow: 0px -18px 0px 3px $hat-color2; | |
| } | |
| .hat-l-side { | |
| top: 90px; | |
| left: -3px; | |
| width: 20px; | |
| height: 20px; | |
| background: $hat-color2; | |
| -webkit-transform: rotate(-8deg); | |
| -ms-transform: rotate(-8deg); | |
| transform: rotate(-8deg); | |
| } | |
| .hat-r-side { | |
| top: 90px; | |
| right: -1px; | |
| width: 20px; | |
| height: 20px; | |
| background: $hat-color2; | |
| -webkit-transform: rotate(8deg); | |
| -ms-transform: rotate(8deg); | |
| transform: rotate(8deg); | |
| } | |
| .hat-top-1 { | |
| top: -3px; | |
| left: 84px; | |
| width: 50px; | |
| height: 6px; | |
| background: $hat-color2; | |
| -webkit-transform: rotate(-20deg); | |
| -ms-transform: rotate(-20deg); | |
| transform: rotate(-20deg); | |
| box-shadow: 1px 0px 1px rgba(0, 0, 0, 0.7); | |
| border-radius: 2px; | |
| z-index: 10; | |
| } | |
| .hat-top-2 { | |
| top: -3px; | |
| left: 84px; | |
| width: 50px; | |
| height: 6px; | |
| background: $hat-color2; | |
| -webkit-transform: rotate(90deg); | |
| -ms-transform: rotate(90deg); | |
| transform: rotate(90deg); | |
| border-radius: 2px; | |
| box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.7); | |
| z-index: 9; | |
| } | |
| .hat-top-3 { | |
| top: -3px; | |
| left: 84px; | |
| width: 50px; | |
| height: 6px; | |
| background: $hat-color2; | |
| -webkit-transform: rotate(20deg); | |
| -ms-transform: rotate(20deg); | |
| transform: rotate(20deg); | |
| border-radius: 2px; | |
| box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.7); | |
| z-index: 8; | |
| } | |
| .hat-top-4 { | |
| top: -3px; | |
| left: 84px; | |
| width: 50px; | |
| height: 6px; | |
| background: $hat-color2; | |
| -webkit-transform: rotate(67deg); | |
| -ms-transform: rotate(67deg); | |
| transform: rotate(67deg); | |
| border-radius: 2px; | |
| box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.7); | |
| z-index: 7; | |
| } | |
| .hat-top-5 { | |
| top: -3px; | |
| left: 84px; | |
| width: 50px; | |
| height: 6px; | |
| background: $hat-color2; | |
| -webkit-transform: rotate(45deg); | |
| -ms-transform: rotate(45deg); | |
| transform: rotate(45deg); | |
| border-radius: 2px; | |
| box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.7); | |
| z-index: 6; | |
| } | |
| .hat-top-6 { | |
| top: -3px; | |
| left: 84px; | |
| width: 50px; | |
| height: 6px; | |
| background: $hat-color2; | |
| -webkit-transform: rotate(-45deg); | |
| -ms-transform: rotate(-45deg); | |
| transform: rotate(-45deg); | |
| border-radius: 2px; | |
| box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.7); | |
| z-index: 5; | |
| } | |
| .hat-top-7 { | |
| top: -3px; | |
| left: 84px; | |
| width: 50px; | |
| height: 6px; | |
| background: $hat-color2; | |
| -webkit-transform: rotate(-67deg); | |
| -ms-transform: rotate(-67deg); | |
| transform: rotate(-67deg); | |
| border-radius: 2px; | |
| box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.7); | |
| z-index: 4; | |
| } | |
| .hat-top-8 { | |
| top: -3px; | |
| left: 84px; | |
| width: 50px; | |
| height: 6px; | |
| background: $hat-color2; | |
| border-radius: 2px; | |
| box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.7); | |
| z-index: 3; | |
| } | |
| } | |
| .left-eye { | |
| top: 90px; | |
| left: 60px; | |
| height: 60px; | |
| width: 50px; | |
| background: #FFF; | |
| border-radius: 50px / 60px; | |
| border: 1px solid #F8E8C1; | |
| box-shadow: -1px -2px 0px -1px #C8B899; | |
| -webkit-transform: rotate(30deg); | |
| -ms-transform: rotate(30deg); | |
| transform: rotate(30deg); | |
| overflow: hidden; | |
| &:after { | |
| content: ""; | |
| position: absolute; | |
| left: 25px; | |
| top: 22px; | |
| width: 6px; | |
| height: 6px; | |
| border-radius: 50%; | |
| background: #312F3C; | |
| z-index: 0; | |
| } | |
| .eyelid-top { | |
| top: -32px; | |
| left: 0px; | |
| width: 50px; | |
| height: 30px; | |
| border-bottom: 1px solid #C8B899; | |
| border-radius: 50% 50% 0 0; | |
| background: $skin-color; | |
| z-index: 5; | |
| -webkit-animation-name: stanlefteyelidtop; | |
| -webkit-animation-duration: 10s; | |
| -webkit-animation-timing-function: linear; | |
| -webkit-animation-delay: 1s; | |
| -webkit-animation-iteration-count: infinite; | |
| -webkit-animation-play-state: running; | |
| animation-name: stanlefteyelidtop; | |
| animation-duration: 10s; | |
| animation-timing-function: linear; | |
| animation-delay: 1s; | |
| animation-iteration-count: infinite; | |
| animation-play-state: running; | |
| } | |
| .eyelid-bottom { | |
| bottom: -32px; | |
| left: 0px; | |
| width: 50px; | |
| height: 30px; | |
| border-top: 1px solid #C8B899; | |
| border-radius: 0 0 50% 50%; | |
| background: $skin-color; | |
| z-index: 5; | |
| -webkit-animation-name: stanlefteyelidbottom; | |
| -webkit-animation-duration: 10s; | |
| -webkit-animation-timing-function: linear; | |
| -webkit-animation-delay: 1s; | |
| -webkit-animation-iteration-count: infinite; | |
| -webkit-animation-play-state: running; | |
| animation-name: stanlefteyelidbottom; | |
| animation-duration: 10s; | |
| animation-timing-function: linear; | |
| animation-delay: 1s; | |
| animation-iteration-count: infinite; | |
| animation-play-state: running; | |
| } | |
| } | |
| .right-eye { | |
| top: 90px; | |
| left: 110px; | |
| height: 60px; | |
| width: 50px; | |
| background: #FFF; | |
| border-radius: 50px / 60px; | |
| border: 1px solid #F8E8C1; | |
| box-shadow: 1px -2px 0px -1px #C8B899; | |
| -webkit-transform: rotate(-30deg); | |
| -ms-transform: rotate(-30deg); | |
| transform: rotate(-30deg); | |
| overflow: hidden; | |
| &:after { | |
| content: ""; | |
| position: absolute; | |
| left: 18px; | |
| top: 20px; | |
| width: 6px; | |
| height: 6px; | |
| border-radius: 50%; | |
| background: #312F3C; | |
| z-index: 0; | |
| } | |
| .eyelid-top { | |
| top: -32px; | |
| left: 0px; | |
| width: 50px; | |
| height: 30px; | |
| border-bottom: 1px solid #C8B899; | |
| border-radius: 50% 50% 0 0; | |
| background: $skin-color; | |
| z-index: 5; | |
| -webkit-animation-name: stanrighteyelidtop; | |
| -webkit-animation-duration: 10s; | |
| -webkit-animation-timing-function: linear; | |
| -webkit-animation-delay: 1s; | |
| -webkit-animation-iteration-count: infinite; | |
| -webkit-animation-play-state: running; | |
| animation-name: stanrighteyelidtop; | |
| animation-duration: 10s; | |
| animation-timing-function: linear; | |
| animation-delay: 1s; | |
| animation-iteration-count: infinite; | |
| animation-play-state: running; | |
| } | |
| .eyelid-bottom { | |
| bottom: -32px; | |
| left: 0px; | |
| width: 50px; | |
| height: 30px; | |
| border-top: 1px solid #C8B899; | |
| border-radius: 0 0 50% 50%; | |
| background: $skin-color; | |
| z-index: 5; | |
| -webkit-animation-name: stanrighteyelidbottom; | |
| -webkit-animation-duration: 10s; | |
| -webkit-animation-timing-function: linear; | |
| -webkit-animation-delay: 1s; | |
| -webkit-animation-iteration-count: infinite; | |
| -webkit-animation-play-state: running; | |
| animation-name: stanrighteyelidbottom; | |
| animation-duration: 10s; | |
| animation-timing-function: linear; | |
| animation-delay: 1s; | |
| animation-iteration-count: infinite; | |
| animation-play-state: running; | |
| } | |
| } | |
| .mouth { | |
| bottom: 30px; | |
| left: 95px; | |
| width: 35px; | |
| height: 15px; | |
| border-radius: 50%; | |
| background: $skin-color; | |
| box-shadow: 0px 3px 0px -1px #000; | |
| } | |
| } | |
| @-webkit-keyframes stanrighteyelidtop { | |
| 0% {top: -32px;} | |
| 2% {top: 0px;} | |
| 4% {top: -32px;} | |
| 100% {top: -32px;} | |
| } | |
| @keyframes stanrighteyelidtop { | |
| 0% {top: -18px;} | |
| 2% {top: 0px;} | |
| 4% {top: -18px;} | |
| 100% {top: -18px;} | |
| } | |
| @-webkit-keyframes stanlefteyelidtop { | |
| 0% {top: -32px;} | |
| 2% {top: 0px;} | |
| 4% {top: -32px;} | |
| 100% {top: -32px;} | |
| } | |
| @keyframes stanlefteyelidtop { | |
| 0% {top: -32px;} | |
| 2% {top: 0px;} | |
| 4% {top: -32px;} | |
| 100% {top: -32px;} | |
| } | |
| @-webkit-keyframes stanlefteyelidbottom { | |
| 0% {bottom: -32px;} | |
| 2% {bottom: 0px;} | |
| 4% {bottom: -32px;} | |
| 100% {bottom: -32px;} | |
| } | |
| @keyframes stanlefteyelidbottom { | |
| 0% {bottom: -32px;} | |
| 2% {bottom: 0px;} | |
| 4% {bottom: -32px;} | |
| 100% {bottom: -32px;} | |
| } | |
| @-webkit-keyframes stanrighteyelidbottom { | |
| 0% {bottom: -32px;} | |
| 2% {bottom: 0px;} | |
| 4% {bottom: -32px;} | |
| 100% {bottom: -32px;} | |
| } | |
| @keyframes stanrighteyelidbottom { | |
| 0% {bottom: -32px;} | |
| 2% {bottom: 0px;} | |
| 4% {bottom: -32px;} | |
| 100% {bottom: -32px;} | |
| } |