CSS border arrow

/** Right ***/.arrow_box {
	position: relative;
	background: #fff;
	border: 1px solid #000;
}
.arrow_box:after, .arrow_box:before {
	left: 100%;
	top: 50%;
	border: solid transparent;
	content: "";
	height: 0;
	width: 0;
	position: absolute;
	pointer-events: none;
}

.arrow_box:after {
	border-color: rgba(255, 255, 255, 0);
	border-left-color: #fff;
	border-width: 12px;
	margin-top: -12px;
}
.arrow_box:before {
	border-color: rgba(0, 0, 0, 0);
	border-left-color: #000;
	border-width: 13px;
	margin-top: -13px;
}
/** Bottom **/
.arrow_box {
	position: relative;
	background: #fff;
	border: 1px solid #000;
}
.arrow_box:after, .arrow_box:before {
	top: 100%;
	left: 50%;
	border: solid transparent;
	content: "";
	height: 0;
	width: 0;
	position: absolute;
	pointer-events: none;
}

.arrow_box:after {
	border-color: rgba(255, 255, 255, 0);
	border-top-color: #fff;
	border-width: 12px;
	margin-left: -12px;
}
.arrow_box:before {
	border-color: rgba(0, 0, 0, 0);
	border-top-color: #000;
	border-width: 13px;
	margin-left: -13px;
}

 

Source: https://cssarrowplease.com/

Leave a Reply