純CSS的CheckBox樣式修改

.limits {
    padding: 20px 50px 0px;
} .limits section{
    padding: 0px 50px;
} .limits input[type=checkbox] {
    visibility: hidden;
} .limits .checkbox {
        width: 15px;
        height: 15px;
        background-color: #5A8BFF !important;
        position: relative !important;
        border: 1px solid #5A8BFF !important;
        display: inline-block;
        margin: 0 !important;
        top: 2px;
    } .limits .checkbox label {
        position: absolute !important;
        width: 15px !important;
        height: 15px !important;
        background: #fff !important;
        left: 0 !important;
        cursor: pointer !important;
        transition: all .5s ease-in !important;
        padding:0!important;
    } .limits input[type=checkbox]:checked + label {
    background-color: #5A8BFF !important;
} .limits input[type=checkbox]:checked + label:after {
        content: '\00a0' !important;
        display: inline-block !important;
        border: 2px solid #fff !important;
        border-top-width: 0 !important;
        border-right-width: 0 !important;
        width: 9px !important;
        height: 5px !important;
        -webkit-transform: rotate(-50deg) !important;
        position: absolute !important;
        top: 3px !important;
        left: 3px !important;
        z-index: 1 !important;
    }

<div class="limits">

<div class="checkbox">

<input type="checkbox" name="FishBaseID" id="id" value=""><label for="id"></label>

</div> </div>

 

轉載自:https://blog.csdn.net/xmLove93/article/details/78389826

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章