css 画三角形

<div class='triangle-rihgt'></div>
<div class='triangle-top'></div>
<div class='triangle-left'></div>
<div class='triangle-bottom'></div>
.triangle-rihgt{
	 0;
	height: 0;
	border-bottom:10px solid  transparent;
	border-top:10px solid  transparent;
        border-left: 20px solid  red;
}
.triangle-left{
	 0;
	height: 0;
	border-bottom:10px solid  transparent;
        border-top:10px solid  transparent;
	border-right: 20px solid  green;
}
.triangle-top{
	 0;
	height: 0;
	border-right:10px solid  transparent;
	border-left:10px solid  transparent;
	border-bottom: 20px solid  #333;
}
.triangle-bottom{
	 0;
	height: 0;
	border-right:10px solid  transparent;
	border-left:10px solid  transparent;
	border-top: 20px solid  #999;
}

  

css三角形

 
 
 
 
原文地址:https://www.cnblogs.com/Enid0044/p/8474168.html