【CSS】- 伪类绘制三角形
::before { content: ""; position: absolute; top: -20px; left: 50%; width: 0px; height: 0px; border: 10px solid transparent; /*以下四个样式对应四种三角形,任选其一即可实现*/ /* border-top-color:lightseagreen; */ /* border-left-color:lightseagreen; */ /* border-right-color:lightseagreen; */ border-bottom-color: #fff; }