1、把元素的宽度和高度设置为0
2、把元素的边框隐藏掉(即边框颜色设置为透明 transparent)
3、再单独设置一条边框的颜色即可
.mydiv{
width: 0;
height: 0;
border: 12px solid transparent;
border-bottom-color: red;
}
1、把元素的宽度和高度设置为0
2、把元素的边框隐藏掉(即边框颜色设置为透明 transparent)
3、再单独设置一条边框的颜色即可
.mydiv{
width: 0;
height: 0;
border: 12px solid transparent;
border-bottom-color: red;
}