博客
关于我
css实现勾号 √
阅读量:591 次
发布时间:2019-03-11

本文共 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/

你可能感兴趣的文章
mysql中json_extract的使用方法
查看>>
mysql中json_extract的使用方法
查看>>
mysql中kill掉所有锁表的进程
查看>>
mysql中like % %模糊查询
查看>>
MySql中mvcc学习记录
查看>>
mysql中null和空字符串的区别与问题!
查看>>