Firefox - 从无装饰的复选框中删除边框 [英] Firefox - Remove border from undecorated checkbox
本文介绍了Firefox - 从无装饰的复选框中删除边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个复选框,具有外观:无;
。这工作在chrome,但在Firefox它留下一个插入边框,我不能删除。我已经尝试过 border:none
I have a checkbox the has the appearance: none;
. This working in chrome, but in Firefox it leaves behind an inset border that I cannot remove. I have tried border: none
already.
这里有一个小调: http://jsfiddle.net/jcJJ5/
推荐答案
不幸的是,似乎没有在复选框上设置任何属性将有所帮助。
Unfortunately, it doesn't seem that setting any properties on the checkbox will help.
我发现的唯一简单的解决方法是将复选框a < div>
,并遮掩边框。
The only simple workaround that I have found is to wrap the checkbox in a <div>
, and obscure the borders.
查看我的小提琴。
HTML:
<div class="checkbox-container"><input type="checkbox" /></div>
CSS:
input[type="checkbox"] {
width: 110px;
height: 110px;
background: red;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
border: none;
position: relative;
left: -5px;
top: -5px;
}
.checkbox-container {
position: absolute;
display: inline-block;
margin: 20px;
width: 100px;
height: 100px;
overflow: hidden;
}
顺便说一下,(至少在Firefox中),设置 background
没有任何效果。
By the way, (in Firefox at least), setting background
doesn't have any effect.
这篇关于Firefox - 从无装饰的复选框中删除边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文