I have an arrow-like shape created with CSS only. I want to apply a border to it and if possible, a box-shadow as well. I've tried following this answer, but it won't work. I also wonder if there's a way to make the left white triangle (the one that gives the arrow the shape) transparent instead of white.
This is what I'm trying to achieve:
This is what I have. As you can see, I'm only missing the border and shadow:
.box {
width: 180px;
height: 30px;
background: -webkit-linear-gradient(-211.23000000000002deg, #B07537 0, #F0B971 100%);
background: -moz-linear-gradient(301.23deg, #B07537 0, #F0B971 100%);
background: linear-gradient(301.23deg, #B07537 0, #F0B971 100%);
text-align: center;
color: #fff;
position: absolute;
display: table;
z-index: 1;
top: 20px;
right: 7px;
filter: drop-shadow(0px 3px 4px rgba(0, 0, 0, 0.25));
}
.box span {
display: table-cell;
vertical-align: middle;
font-size: 1em;
font-weight: 500;
}
.box:before {
content: '';
position: absolute;
border-left: 15px solid white;
border-top: 15px solid transparent;
border-bottom: 17px solid transparent;
left: 0px;
top: 0px;
width: 0;
height: 0;
display: block;
}
<div class="box">
<span>Text</span>
</div>