JSFiddle - React, Tailwind, and code Playground
by adamschwartz
HTML
<div class="line"></div>
<div class="arrow">
<div class="arrow-inner"></div>
</div>
<div class="arrow2-shadow"></div>
<div class="arrow2"></div>
CSS
body {
background: lightBlue;
}
.arrow {
position: absolute;
top: 100px;
left: 100px;
height: 1em;
width: 1em;
overflow: hidden;
}
.arrow-inner {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
transform: rotateZ(45deg) translateY(50%) translateX(50%) translateZ(0);
background: rgba(255, 255, 255, .9);
box-shadow: 0 0 0 1px rgba(0, 0, 0, .25);
}
.arrow2 {
position: absolute;
top: 100px;
left: 36px;
height: 0;
width: 0;
border-width: .5em;
border-color: transparent transparent rgba(255, 255, 255, .9) transparent;
border-style: solid;
}
.arrow2-shadow {
position: absolute;
top: 99px;
left: 36px;
height: 0;
width: 0;
border-width: .5em;
border-color: transparent transparent rgba(0, 0, 0, .3) transparent;
border-style: solid;
}
.line {
position: absolute;
top: 113px;
height: 1px;
width: 100%;
background: red;
}