checkbox添加圆角

 input[type="checkbox"] {
            width: 1.64rem;
            height: 1.64rem;
            display: inline-block;
            text-align: center;
            vertical-align: baseline;
            line-height: 1.64rem;
            position: relative;
            border-radius: 50%;
            outline: none;
            -webkit-appearance: none;
            ​border: 1px solid #fff;
            -webkit-tab-highlight-color: rgba(0, 0, 0, 0);
            color: #fff;
            background: #fff;
            margin-left: 3px;

        }

        input[type="checkbox"]::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            background: #fff;
            width: 100%;
            height: 100%;
            border: 1px solid #999999;
            border-radius: 50%;
            color: #fff;
            margin-top: 5px;
        }

        input[type=checkbox]:checked::before {
            content: "\2713";
            /* background-color: #657afe; */
            border: 1px solid #657afe;
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            color: green;
            font-size: 1.52rem;
            border-radius: 50%;
        }

 

posted @ 2022-04-28 12:10  lijun12138  阅读(316)  评论(0)    收藏  举报