尝试在此处选择模式对话框中的任何复选框:http://ezami.com/ - 单击右上角功能区后弹出的那个。它们似乎都不起作用。使用 z-index 进行了一些研究和测试,但到目前为止似乎没有任何效果,只有设置的 z-index 是模态值并且似乎工作正常。
最佳答案
我已为您要实现的逻辑准备好此示例。图像/颜色可以是任何东西。 Demo link
<html>
<head>
<title>Checkbox</title>
<style>
input[type=checkbox] {
display:none;
}
input[type=checkbox] + label
{
background: #999;
height: 16px;
width: 16px;
display:inline-block;
padding: 0 0 0 0px;
}
input[type=checkbox]:checked + label
{
background: #0080FF;
height: 16px;
width: 16px;
display:inline-block;
padding: 0 0 0 0px;
}
</style>
</head>
<body>
<p>
<input type='checkbox' name='thing' value='valuable' id="thing"/><label for="thing"></label>
</body>
</html>
关于css - 无法在模态对话框中选择复选框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18603245/