javascript - How to to make base shape with CSS? -


i'm trying make base shape css since need add homepage of website. final version attached below image. please me out, i'm not sure how achieve this

css shape

#base {    background: #0a863d;    display: inline-block;    height: 55px;    margin-left: 20px;    margin-top: 55px;      position: relative;      width: 100px;  }  #base:before {    border-bottom: 35px solid #0a863d;    border-left: 50px solid transparent;    border-right: 50px solid transparent;    content: "";    height: 0;    left: 0;    position: absolute;    top: -35px;    width: 0;  }
<div id="base"></div>

change borders :after element:

#base {    background: #0a863d;    display: inline-block;    height: 60px;    margin-left: 20px;    margin-top: 55px;    position: relative;    width: 100px;  }  #base:before {      border-left: 30px solid #0a863d;      border-top: 30px solid transparent;      border-bottom: 30px solid transparent;      content: "";      height: 0;      position: absolute;      width: 0;      right: -30px;  }
<div id="base"></div>


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -