1CSS
.demo4 { 0px; height: 0px; border: 10px solid; border-color: transparent transparent red transparent; /*background-color: lightblue;*/ margin: 0 auto; position: relative; /*top: -20px; left: 30px;*/ } .demo5 { 0px; height: 0px; border: 9px solid; border-color: transparent transparent white transparent; margin: 0 auto; position: relative; top: -18px; /*left: 30px;*/ }
2:html
<div style="20px;height:20px;background-color:lightblue;position:relative;z-index:100"> <div class="demo4"> </div> <div class="demo5"> </div> </div>