<div class="arrow arrow-left">стрелка влево</div>
<br>
<div class="arrow arrow-top">стрелка вверх</div>
<br>
<div class="arrow arrow-bottom">стрелка вниз</div>
<br>
<div class="arrow arrow-right">стрелка вправо</div>
<br>
body {
font-size:14px;
padding: 15px 20px;
display: flex;
justify-content: flex-start;
}
.arrow {
width: 150px;
margin: 20px;
padding: 10px;
position: relative;
background: #fff;
border: 1px solid orange;
text-align: center;
}
.arrow:after,
.arrow:before {
content: "";
border: solid transparent;
position: absolute;
}
/* Left-Top */
.arrow-left:after,
.arrow-left:before {
left: -20px;
right: 100%;
transform: rotate(-90deg);
}
.arrow-left:after {
border-bottom-color: #fff;
border-width: 9px;
margin-left: 1px;
}
.arrow-left:before {
border-bottom-color: orange;
border-width: 9px;
margin-left: 0px;
}
/* Top */
.arrow-top:after,
.arrow-top:before {
left: calc(50% - .5rem);
bottom: 100%;
}
.arrow-top:after {
border-bottom-color: #fff;
border-width: 8px;
}
.arrow-top:before {
border-bottom-color: orange;
border-width: 9px;
margin-left: -1px;
}
/* Bottom */
.arrow-bottom:after,
.arrow-bottom:before {
left: calc(50% - .5rem);
bottom: -18px;
transform: rotate(180deg);
}
.arrow-bottom:after {
border-bottom-color: #fff;
border-width: 10px;
margin-left: -2px;
}
.arrow-bottom:before {
border-bottom-color: orange;
border-width: 9px;
margin-left: -1px;
}
/* right*/
.arrow-right:after,
.arrow-right:before {
right: -20px;
left: 100%;
transform: rotate(90deg);
}
.arrow-right:after {
border-bottom-color: #fff;
border-width: 9px;
margin-right: 2px;
}
.arrow-right:before {
border-bottom-color: orange;
border-width: 9px;
margin-right: 0px;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.