我有一个模态框放在一个页面上,其中包含一个带复选框的表单。问题是,当我打开模态时,一切正常,但复选框位于模态的顶部。
这是模态的JS:
<script>
usr_ddown = "hidden";
function lchr_usr_menu(){
if(usr_ddown === "hidden"){
document.getElementById("ur_menu_lchr").innerHTML = "▲";
$("#usr_dropdown").fadeIn(200);
usr_ddown = "vis";
return false;
}
if(usr_ddown === "vis"){
document.getElementById("ur_menu_lchr").innerHTML = "▼";
$("#usr_dropdown").fadeOut(200);
usr_ddown = "hidden";
return false;
}
}
</script>
模态的HTML / CSS:
<div id="usr_dropdown" style="z-index 100;position: fixed; top:81px; left:0px; right: auto; background: #470047; padding: 10px; right:0px; height: 300px;-webkit-box-shadow: 0 0px 5px #000000;-moz-box-shadow: 0 0px 5px #000000;box-shadow: 0 0px 5px #000000;opacity:0.9;filter:alpha(opacity=90);">
<div style="text-align: right;position: absolute; bottom:5px;right:5px;">
[<a href="javascript:void(0);" onclick="lchr_usr_menu()">close</a>]
</div>
</div>
现在选中复选框:
<input type="checkbox" value="YT_vid" name="YT_vid" id="YT_vid" onclick="inc_yt_f()" />
出于某种原因,除了复选框之外,所有元素都在模态后面,我运行谷歌搜索并没有找到太多。需要修复什么?
提前致谢!
编辑:
Checkbox CSS:
input[type=checkbox],
input[type=radio] {
-webkit-appearance: none;
appearance: none;
width: 13px;
height: 13px;
margin: 0;
cursor: pointer;
vertical-align: bottom;
background: #fff;
border: 1px solid #dcdcdc;
-webkit-border-radius: 1px;
-moz-border-radius: 1px;
border-radius: 1px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
position: relative;
}