0
我知道这是一个老问题,并且已经回答了很多次,但我无法弄清楚如何将修复基础与其他示例结合。复选框和单选按钮样式在Firefox中不起作用
确定了复选框的样式后,它在Chrome和Opera中看起来不错(它应该看起来很好),但在Firefox和IE中它仍然看起来像同样丑陋的复选框。有没有简单的方法来解决这个问题,因此它在所有浏览器中看起来都一样?如果是的话,有人可以看到我的CSS全新视图,请帮我解决这个问题。我正在使用联系表单7,所以HTML不可更改,或者我会根据其他教程自行更改HTML代码和样式。
/*Below is for Radio Buttons*/
.wpcf7-form-control.wpcf7-radio input[type="radio" ] {
margin: 5px 20px 0px 3px;
border: 2px solid #35a4d5;
padding: 10px;
-webkit-appearance: none;
border-radius: 50%;
}
.wpcf7-list-item.first .wpcf7-list-item-label,.wpcf7-list-item.last .wpcf7-list-item-label {
font-size: 18px;
vertical-align: 5px;
}
.wpcf7-form-control.wpcf7-radio input[type="radio" ]:checked{
background:#555;
box-shadow: inset 0px 0px 0px 3px white;
-webkit-box-shadow: inset 0px 0px 0px 3px white;
-moz-box-shadow: inset 0px 0px 0px 3px white;
-o-box-shadow: inset 0px 0px 0px 3px white;
-webkit-border-radius: 100%;
-moz-border-radius: 100%;
-o-border-radius: 100%;
}
.wpcf7-form-control.wpcf7-radio input:focus{
outline:none;
}
/*END*/
/*Below is for Check Boxes*/
.wpcf7-form-control.wpcf7-checkbox input[type="checkbox" ]{
margin: 5px 4px 0px 3px;
border: 2px solid #35a4d5;
padding: 10px;
-webkit-appearance: none;
}
.wpcf7-list-item.first.last .wpcf7-list-item-label{
font-size: 20px;
vertical-align: 5px;
}
.wpcf7-form-control.wpcf7-checkbox input[type="checkbox" ]:checked{
background:#555;
box-shadow: inset 0px 0px 0px 3px white;
-webkit-box-shadow: inset 0px 0px 0px 3px white;
-moz-box-shadow: inset 0px 0px 0px 3px white;
-o-box-shadow: inset 0px 0px 0px 3px white;
}
.wpcf7-form-control.wpcf7-checkbox input:focus{
outline:none;
}
/*END*/
<span class="wpcf7-form-control-wrap RVCategory">
<span class="wpcf7-form-control wpcf7-radio">
<span class="wpcf7-list-item first">
<span class="wpcf7-list-item-label" style="">Motorhome
</span>
<input type="radio" name="RVCategory" value="Motorhome" checked="checked">
</span>
<span class="wpcf7-list-item last">
<span class="wpcf7-list-item-label">Trailer
</span>
<input type="radio" name="RVCategory" value="Trailer">
</span>
</span>
</span>
<p></p>
<span class="myCheckboxes">
<span class="wpcf7-form-control-wrap checkbox-112">
<span class="wpcf7-form-control wpcf7-checkbox">
<span class="wpcf7-list-item first last">
<input type="checkbox" name="checkbox-112[]" value="Electric Generator">
<span class="wpcf7-list-item-label">Electric Generator</span>
</span>
</span>
</span>
</span>
一个codepen什么是你的CSS这个 “我”? :-) [type =“checkbox”i] –
编辑了“我”出了CSS,但仍然没有在FF和IE –
确定看看这个。这应该解决您的问题(我希望):http://stackoverflow.com/questions/19145504/style-a-checkbox-in-firefox-remove-check-and-border –