方法一:
<div class="triangle"></div>css
.triangle{width: 8px;height: 8px;border: 8px solid #3C69EF;/* border-radius: 0px 2px 0 0; */ // 右上角加一点圆角border-block-end: 8px solid transparent;border-inline-start: 8px solid transparent;
}
不写 border-inline-start,是这样的效果
方法二:
css
.triangle{width: 20px;height: 20px;clip-path: polygon(0 0, 100% 0, 0 100%, 0 0);border: 20px solid #3C69EF;
}
方法三:
.{width: 20px;height: 20px;background: conic-gradient(from 90deg at 0 0, #3C69EF 0, #3C69EF 45deg, transparent 45.1deg);
}
以后补充