css arrow triangle

html:

<div class="arrow-down"></div>
<div class="arrow-up"></div>
<div class="arrow-left"></div>
<div class="arrow-right"></div>

css:

.arrow-up {
	width: 0; 
	height: 0; 
	border: 5px solid transparent;
	border-bottom: 5px solid black;
}

.arrow-down {
	width: 0; 
	height: 0; 
	border: 20px solid transparent;
	border-top: 20px solid #f00;
}

.arrow-right {
	width: 0; 
	height: 0; 
	border: 60px solid transparent;
	border-left: 60px solid green;
}

.arrow-left {
	width: 0; 
	height: 0; 
	border: 10px solid transparent;
	border-right: 10px solid blue; 
}

Leave a Reply

Your email address will not be published. Required fields are marked *