.uptri{
width:0px;
height:0px;
border-top:100px solid white;
border-left:100px solid white;
border-bottom:100px solid blue;
border-right:100px solid white;
}
写一个角向上的三角形 容器最小化,边距往外扩,实现三角形。
但是在使用的使用有问题,使用div就没问题,用button就会出现以下效果:
(没有尖头)
加一句padding:0;就可以了。因为button本身默认设置了padding的属性。
效果如下: