三角形:使用border
#c {
width: 0;
height: 0;
border-top: 100px solid transparent;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
border-bottom: 100px solid red;
}
原理:五颜六色的就是border
箭头:
.c {
width: 20px;
height: 20px;
border-top: 1px solid red;
border-right: 1px solid red;
transform: rotate(45deg);
}
原理: