css利用border绘制各种方向的三角形


代码

  <div style="width: 0;height: 0;border-top: 100px solid #2132ff;border-left: 100px solid transparent"></div>
<div style="width: 0;height: 0;border-top: 100px solid #ff2834;border-right: 100px solid transparent"></div>
<div style="width: 0;height: 0;border-bottom: 100px solid #7aff1a;border-left: 100px solid transparent"></div>
<div style="width: 0;height: 0;border-bottom: 100px solid #ff00be;border-right: 100px solid transparent"></div>
<div style="width: 0;height: 0;border-right: 100px solid #000000;border-top: 50px solid transparent;border bottom: 50px solid transparent;"></div>