CSS Pencil

CSS Pencil

HTML
<div class="pencil">
  <div class="pencil-top"></div>
  <div class="pencil-body"></div>
  <div class="pencil-bottom"></div>
</div>
CSS
.pencil {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
  }

.pencil-top {
    height: 40px;
    background-color: #ec8787;
    border-top-left-radius: 9px;
    border-top-right-radius: 9px;
}

.pencil-body {
    height: 600px;
    background: #FFEB3B;
}

.pencil-bottom {
    border-top: 60px solid #FFCC99;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
}

.pencil-bottom:after {
   content: "";
   position: absolute;
   border-top: 30px solid #333;
   border-right: 15px solid transparent;
   border-left: 15px solid transparent;
   bottom: 0px;
   left: 15px;
}
442 Views
88750cookie-checkCSS Pencil

Leave a Reply

Your email address will not be published. Required fields are marked *