css - 无法在模态对话框中选择复选框

标签 css input checkbox modal-dialog

尝试在此处选择模式对话框中的任何复选框: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/

相关文章:

html - 复选框只影响一个元素?

具有移动支持和 Logo 的 Html 导航栏

javascript - 通过 'mouseover' 上的延迟循环增加 (+) 文本大小

html - Css 选择所有但第一个 tr 不起作用

php - 使用 HTML5 和 PHP 加载多个文件

html - Css 按钮 :focus

css - 在css中更改复选框复选标记的颜色

html - 我想使用 html 在表格的每一行旁边添加一个复选框

css - IE CSS 错误 : IMG original height affecting parent height

javascript - 如何仅在更改后验证输入?