JSFiddle - React, Tailwind, and code Playground
by Luis Almeida
HTML
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<div id="main-nav">
<div id="triangle">
</div>
</div>
CSS
#main-nav {
position: relative;
height: 200px;
width: 1200px;
background-color: #D1C5B9;
overflow:hidden;
z-index: 1;
}
#triangle {
position: absolute;
display: block;
width: 100%;
background: #3C3C3A;
height: 40px;
z-index: 4;
}
#triangle:after {
position: absolute;
content: "";
display: block;
width: 100px;
height: 50px;
transform: rotate(15deg);
background: #3C3C3A;
z-index: 4;
border-radius: 14px;
left: 50%;
margin-left: -65px;
top: 0px;
border: 1px solid #3C3C3A;
}
#triangle:before {
position: absolute;
content: "";
display: block;
width: 100px;
height: 50px;
transform: rotate(-15deg);
background: #3C3C3A;
z-index: 3;
border-radius: 14px;
left: 50%;
margin-right: 0;
top: 0px;
border: 1px solid #3C3C3A;
}