本文共 395 字,大约阅读时间需要 1 分钟。
.check {
position: relative; display: inline-block; width: 25px; height: 25px; background: red; border-radius: 25px; } .check::after { content: ""; position: absolute; left: 5px; top: 8px; width: 50%; height: 25%; border: 2px solid #000; border-radius: 1px; border-top: none; border-right: none; background: transparent; transform: rotate(-45deg); }实现原理是利用::after 或 ::before 使一个元素变成多个 再画半个边框 旋转
转载地址:http://iuptz.baihongyu.com/