标签:style 实现 border top code position class parent nbsp
.square{ width:0; height:0; margin:0 auto; border:6px solid transparent; border-bottom: 6px solid red; //自行调整方向,. }
带缺口的三角形:
<div class="box b1"></div> <div class="box b2"></div>
.box{ position: absolute; left: 0; top: 0; width: 0; height:0; border: 6px solid transparent; } .b1{ border-bottom-color:#000 ; } .b2{ border-bottom-color:#fff ; }
标签:style 实现 border top code position class parent nbsp
原文地址:http://www.cnblogs.com/by-dxm/p/6417717.html