IE 和 Chrome 中的复选框看起来不同。
Chrome
IE
从上面的图片中您可以看到差异。我希望 chrome 中的复选框看起来与 IE 中的一样。
I tried webkit-box-shadow和其他类似的 css 属性,但没有运气。您能否建议如何实现这一目标?
一个非常简单的方法就是添加-webkit-appearance: none;
。但是您需要设置复选框的样式以匹配您想要的内容。这是一个例子:
http://jsfiddle.net/tzdcbyc5/
<input class="checkbox" type="checkbox">
<input class="checkbox" type="checkbox" checked>
.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%;
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)