三角形
.triangle{
width: 0;
height: 0;
border-width: 10px;
border-style: solid;
border-color: transparent transparent transparent red;
}
高自适应的正方形
.square {
width: 10%;
height: 10vw;
background: tomato;
}
.square {
width: 20%;
height: 0;
padding-top: 20%;
background: orange;
}
.square {
width: 30%;
overflow: hidden;
background: yellow;
}
.square::after {
content: "";
display: block;
margin-top: 100%;
}