首页 > 代码库 > CSS之盒子倒三角

CSS之盒子倒三角

 1 div{
 2         position: relative;
 3     }
 4     em ,span{
 5         border-style:solid dashed dashed dashed;
 6         border-color:transparent;
 7         border-width:3px;
 8         position: absolute;
 9         top:0;
10         left: 0;
11     }
12     em{border-top-color: #3c3c3c;top:1px;}
13     span{border-top-color: white;}
14 
15 <div>
16         <em></em>
17         <span></span>
18 </div>

 效果如图:--->