Skip to content

Instantly share code, notes, and snippets.

@anilkk
Created July 25, 2013 12:28
Show Gist options
  • Select an option

  • Save anilkk/6079153 to your computer and use it in GitHub Desktop.

Select an option

Save anilkk/6079153 to your computer and use it in GitHub Desktop.
A CodePen by anilbms.
<div class="container">
<div class="hat-top">
<div class="hat-bottom">)</div>
</div>
<div class="face-top">
<div class="eyebro">_</div>
<div class="glass"></div>
<div class="glass right"></div>
<div class="nose-top">)</div>
</div>
<div class="face-bottom">
<div class="mouth">
<div class="lips">||||||||||||||</div>
<div class="lower-lip"></div>
</div>
</div>
</div>
body {
width: 960px;
margin: 0 auto;
}
.container {
position: relative;
top: 50px;
}
.hat-top {
background: black;
width: 120px;
height: 50px;
border-radius: 30px 30px 0 0;
}
.hat-bottom {
position: relative;
transform: rotateZ(90deg) translateX(97px) translateY(-15px) scaleY(10);
}
.face-top {
background: gray;
width: 120px;
height: 50px;
border: 0;
box-sizing: border-box;
}
.eyebro {
transform: scaleX(13) scaleY(2) translateX(50.5px) translateY(-5px);
}
.glass {
width: 35px;
height: 20px;
background: black;
border-radius: 0 0 15px 15px;
position: relative;
top: -3px;
left: 5px;
}
.glass.right {
top: -25px;
left: 65px;
}
.nose-top {
font-size: 15px;
transform: rotateZ(20deg) translateX(34px) translateY(-40px) scaleY(2.4);
}
.face-bottom {
width: 40px;
height: 0;
border-left: 40px solid transparent;
border-top: 35px solid gray;
border-right: 40px solid transparent;
}
.mouth {
width: 50px;
height: 40px;
background: black;
border-radius: 0 0 15px 15px;
position: relative;
top: -35px;
left: -5px;
border-left: 2px solid white;
border-right: 2px solid white;
color: white;
}
.lips {
text-align: center;
transform: scaleY(0.7);
}
.lower-lip {
width: 40px;
height: 10px;
margin: 0 0 0 5px;
border-bottom: 2px solid white;
position: relative;
top: -10px
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment