Eric Cartman created with CSS3. This pen was inspired by Chris Pattle's 'Simpsons in CSS'
A Pen by Radimir Bitsov on CodePen.
Eric Cartman created with CSS3. This pen was inspired by Chris Pattle's 'Simpsons in CSS'
A Pen by Radimir Bitsov on CodePen.
| <section class="container"> | |
| <div id="cartman"> | |
| <div class="head"> | |
| <div class="hat"> | |
| <div class="hat-top-1"></div> | |
| <div class="hat-top-2"></div> | |
| <div class="hat-top-3"></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-right"></div> | |
| <div class="mouth-left"></div> | |
| <div class="teeht"></div> | |
| <div class="chin-top"></div> | |
| <div class="chin-bottom"></div> | |
| </div> | |
| </div> | |
| </section> |
| .container{ } | |
| #cartman { | |
| margin: 0 auto; | |
| position: relative; | |
| height: 270px; | |
| width: 300px; | |
| * { | |
| position: absolute; | |
| } | |
| .head { | |
| top: 20px; | |
| width: 220px; | |
| height: 180px; | |
| background: #FEEEC6; | |
| border-radius: 50%; | |
| } | |
| .hat { | |
| top: 0; | |
| width: 220px; | |
| height: 90px; | |
| background: #00BAC3; | |
| border-radius: 220px 220px 0 0; | |
| &:after { | |
| content: ""; | |
| position: absolute; | |
| top: 55px; | |
| width: 220px; | |
| height: 70px; | |
| border-radius: 220px / 70px; | |
| background: #FEEEC6; | |
| box-shadow: 0px -8px 0px 1px #FDDF1B;; | |
| } | |
| .hat-top-1 { | |
| top: -10px; | |
| left: 75px; | |
| width: 40px; | |
| height: 10px; | |
| border-radius: 20px / 5px; | |
| background: #FDDF1B; | |
| -webkit-transform: rotate(-20deg) skew(-35deg); | |
| -ms-transform: rotate(-20deg) skew(-35deg); | |
| transform: rotate(-20deg) skew(-35deg); | |
| } | |
| .hat-top-2 { | |
| top: -10px; | |
| left: 95px; | |
| width: 20px; | |
| height: 20px; | |
| border-radius: 10px; | |
| background: #FDDF1B; | |
| } | |
| .hat-top-3 { | |
| top: -10px; | |
| left: 90px; | |
| width: 50px; | |
| height: 15px; | |
| border-radius: 25px / 5px; | |
| background: #FDDF1B; | |
| box-shadow: 2px 2px 0px -3px #5F5F5F; | |
| -webkit-transform: rotate(15deg); | |
| -ms-transform: rotate(15deg); | |
| transform: rotate(15deg); | |
| } | |
| } | |
| .left-eye { | |
| top: 57px; | |
| 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: #FEEEC6; | |
| z-index: 5; | |
| -webkit-animation-name: cartmanlefteyelidtop; | |
| -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: cartmanlefteyelidtop; | |
| 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: #FEEEC6; | |
| z-index: 5; | |
| -webkit-animation-name: cartmanlefteyelidbottom; | |
| -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: cartmanlefteyelidbottom; | |
| animation-duration: 10s; | |
| animation-timing-function: linear; | |
| animation-delay: 1s; | |
| animation-iteration-count: infinite; | |
| animation-play-state: running; | |
| } | |
| } | |
| .right-eye { | |
| top: 57px; | |
| 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: #FEEEC6; | |
| z-index: 5; | |
| -webkit-animation-name: cartmanrighteyelidtop; | |
| -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: cartmanrighteyelidtop; | |
| 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: #FEEEC6; | |
| z-index: 5; | |
| -webkit-animation-name: cartmanrighteyelidbottom; | |
| -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: cartmanrighteyelidbottom; | |
| animation-duration: 10s; | |
| animation-timing-function: linear; | |
| animation-delay: 1s; | |
| animation-iteration-count: infinite; | |
| animation-play-state: running; | |
| } | |
| } | |
| .chin-top { | |
| bottom: 20px; | |
| left: 85px; | |
| width: 40px; | |
| height: 10px; | |
| border-radius: 20px / 5px; | |
| background: #FEEEC6; | |
| box-shadow: 1px -2px 0px -1px #727271; | |
| } | |
| .chin-bottom { | |
| bottom: 12px; | |
| left: 20px; | |
| width: 180px; | |
| height: 100px; | |
| border-radius: 90px / 50px; | |
| background: transparent; | |
| box-shadow: 0px 2px 0px -1px #727271; | |
| } | |
| } | |
| @-webkit-keyframes cartmanrighteyelidtop { | |
| 0% {top: -32px;} | |
| 2% {top: 0px;} | |
| 4% {top: -32px;} | |
| 100% {top: -32px;} | |
| } | |
| @keyframes cartmanrighteyelidtop { | |
| 0% {top: -18px;} | |
| 2% {top: 0px;} | |
| 4% {top: -18px;} | |
| 100% {top: -18px;} | |
| } | |
| @-webkit-keyframes cartmanlefteyelidtop { | |
| 0% {top: -32px;} | |
| 2% {top: 0px;} | |
| 4% {top: -32px;} | |
| 100% {top: -32px;} | |
| } | |
| @keyframes cartmanlefteyelidtop { | |
| 0% {top: -32px;} | |
| 2% {top: 0px;} | |
| 4% {top: -32px;} | |
| 100% {top: -32px;} | |
| } | |
| @-webkit-keyframes cartmanlefteyelidbottom { | |
| 0% {bottom: -32px;} | |
| 2% {bottom: 0px;} | |
| 4% {bottom: -32px;} | |
| 100% {bottom: -32px;} | |
| } | |
| @keyframes cartmanlefteyelidbottom { | |
| 0% {bottom: -32px;} | |
| 2% {bottom: 0px;} | |
| 4% {bottom: -32px;} | |
| 100% {bottom: -32px;} | |
| } | |
| @-webkit-keyframes cartmanrighteyelidbottom { | |
| 0% {bottom: -32px;} | |
| 2% {bottom: 0px;} | |
| 4% {bottom: -32px;} | |
| 100% {bottom: -32px;} | |
| } | |
| @keyframes cartmanrighteyelidbottom { | |
| 0% {bottom: -32px;} | |
| 2% {bottom: 0px;} | |
| 4% {bottom: -32px;} | |
| 100% {bottom: -32px;} | |
| } |