css - Border radius of complex shape -


i trying following shape css. me kind of tutorial or code snippet of how having king of shape css?

enter image description here

you'll need few elements 2 create thingies on left , right.

note: works on solid background (in case white background used on .ws_left:before , .ws_right:before

body { margin: 5em; }  .ws {    position: relative;    width: 15em;    height: 15em;    background: gray;    border-radius: 0 0 1em 1em;  }  .ws_left {    position: absolute;    top: 0;    left: -4em;    right: 100%;    height: 2.5em;    background: gray;    border-radius: 1em 0 0 1em;  }    .ws_left:before, .ws_left:after,    .ws_right:before, .ws_right:after {      content: '';      position: absolute;      background: red;      width: 1em;      height: 1em;      top: 100%;      right: 0;      z-index: 1;    }    .ws_left:before {      border-top-right-radius: 1em;      background: white;      z-index: 2;    }    .ws_left:after {      background: gray;    }      .ws_right:before, .ws_right:after {      right: auto;      left: 0;    }    .ws_right:before {      border-top-left-radius: 1em;      background: white;      z-index: 2;    }    .ws_right:after {      background: gray;    }  .ws_right {    position: absolute;    top: 0;    left: 100%;    right: -2em;    height: 2.5em;    background: gray;    border-radius: 0 1em 1em 0;  }
<div class="ws">    <div class="ws_left"></div>    <div class="ws_right"></div>  </div>


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -