Make checkbox in chrome look like one in IE

前端 未结 4 1259
长情又很酷
长情又很酷 2021-01-15 02:05

The checkbox in IE and chrome looks different.

Chrome

\"enter

4条回答
  •  Happy的楠姐
    2021-01-15 02:25

    A really simple way is just to add -webkit-appearance: none;. But you will need to then style the checkbox to match what you want. Here is an example:

    http://jsfiddle.net/tzdcbyc5/

    
    
    
    .checkbox {
        position: relative;
        width: 14px;
        height: 14px;
        border: 1px solid #111;
        background: #fff;
        -webkit-appearance: none;
        appearance: none;
    }
    
    .checkbox:checked {
        background: url(http://vignette3.wikia.nocookie.net/roblox/images/5/57/Very-Basic-Checkmark-icon.png/revision/latest?cb=20131125154354) no-repeat center center;
        background-size: 100%;
    }
    

提交回复
热议问题