把div的高宽都设置为0;

利用border来实现纯css的三角形

要是倒三角,则有border-top没有botton 左右border都不要;

width: 0;
height: 0;
border-width: 7px;
border-style: solid;
border-color: transparent;
border-top-color: #fff;

(但是在css6下会有黑色背景,其他的没有,寻求方法解决中。。。)