You can also achieve this simply with the following code. In this case, only one div is required.
From this point on, you can, of course, customize everything, but this is only to give you a rough idea.
HTML
<div class="box"></div>
CSS
.box{ width: 400px; height: 100px; background: #008dd0; border-radius: 10px; position: relative; overflow: hidden; } .box:after{ content: ''; position: absolute; top: 0; right: 0; width: 30%; height: 100%; background: #ffa008; } .box:before{ content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%) skew(-10deg); width: 40%; height: 100%; background: #008dd0; border: 2px solid white; border-width: 0 8px; z-index: 100; }
.box { width: 400px; height: 100px; background: #008dd0; border-radius: 10px; position: relative; overflow: hidden; } .box:after { content: ''; position: absolute; top: 0; right: 0; width: 30%; height: 100%; background: #ffa008; } .box:before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%) skew(-10deg); width: 40%; height: 100%; background: #008dd0; border: 2px solid white; border-width: 0 8px; z-index: 100; }
<div class="box"></div>
Svenl source share