可以在Firefox和Chrome中选择和取消选择以下单选按钮,但不能在MS Edge或IE11中选择。我该怎么做才能让它在这些浏览器上运行?
我尝试过从这里开始的几个技巧,但没有一个可行:https://www.triplet.fi/blog/problem-solved-custom-checkbox-not-working-on-edge/
<div class="ig-btn">
<div class="text-center click-to">Click to <br>
<span class="join">JOIN</span>
</div>
<div style="position: absolute;">
<div class="checkbox text-center">
<label for="user_remember_me" class="i-checks">
<input id="user_remember_me" name="sign_up_private[]" type="checkbox" value="<?php echo bp_get_group_id(false)?>">
<input name="user[remember_me]" type="hidden" value="0"><i></i>
</label>
</div>
</div>
</div>
班级的CSS:
.ig-btn, .ig-img, .ig-para {
float: left;
}
.ig-btn {
background-color: #ccc;
width: 113px;
height: 240px;
font-family: 'Open Sans', sans-serif;
font-size: 20px;
color: #e59629;
}
.join {
font-size: 30px;
margin-top: -10px;
display: block;
}
.ig-btn .radio, .ig-btn .checkbox {
position: relative;
display: block;
margin-top: 10px;
margin-bottom: 10px;
top: 0;
left: 37px;
}
.ig-btn .radio label, .ig-btn .checkbox label {
min-height: 20px;
padding-left: 20px;
margin-bottom: 0;
font-weight: normal;
cursor: pointer;
}
.ig-btn .i-checks input {
position: absolute;
margin-left: -20px;
opacity: 0;
}
.ig-btn .checkbox input[type="checkbox"] {
position: absolute;
margin-top: 4px \9;
margin-left: -20px;
}
.ig-btn .i-checks input {
position: absolute;
margin-left: -20px;
opacity: 0;
}
.ig-btn input[type="checkbox"] {
margin: 4px 0 0;
margin-top: 1px \9;
line-height: normal;
}
.ig-btn .i-checks input:checked+i {
border-color: #e59629;
}
.ig-btn .i-checks>i {
position: relative;
display: inline-block;
width: 30px;
height: 30px;
margin-top: -2px;
margin-right: 4px;
margin-left: -20px;
line-height: 1;
vertical-align: middle;
background-color: #fff;
border: 3px solid #e59629;
border-radius: 20px;
}
.ig-btn .i-checks input:checked+i:before {
top: 4px;
left: 4px;
width: 22px;
height: 22px;
background-color: #e59629;
border-radius: 20px;
}
.ig-btn .i-checks>i:before {
position: absolute;
top: 50%;
left: 50%;
width: 0;
height: 0;
background-color: transparent;
content: "";
-webkit-transition: all 0.2s;
transition: all 0.2s;
}
input[type="checkbox"] {
margin: 4px 0 0;
margin-top: 1px \9;
line-height: normal;
}
.i-checks input:checked+i {
border-color: #e59629;
}
.i-checks input {
position: absolute;
margin-left: -20px;
opacity: 0;
}
.checkbox input[type="checkbox"] {
position: absolute;
margin-top: 4px \9;
margin-left: -20px;
}
.i-checks input {
position: absolute;
margin-left: -20px;
opacity: 0;
}
input[type="checkbox"] {
margin: 4px 0 0;
margin-top: 1px \9;
line-height: normal;
}
.i-checks input:checked+i {
border-color: #e59629;
}
.i-checks>i {
position: relative;
display: inline-block;
width: 18px;
height: 18px;
margin-top: -2px;
margin-right: 4px;
margin-left: -20px;
line-height: 1;
vertical-align: middle;
background-color: #fff;
border: 2px solid #e59629;
border-radius: 10px;
}
.i-checks input:checked+i::before {
top: 4px;
left: 4px;
width: 10px;
height: 10px;
background-color: #e59629;
border-radius: 10px;
}
.i-checks>i::before {
position: absolute;
top: 50%;
left: 50%;
width: 0;
height: 0;
background-color: transparent;
content: "";
-webkit-transition: all 0.2s;
transition: all 0.2s;
}