【问题标题】:Checkbox and radiobutton won't show复选框和单选按钮不会显示
【发布时间】:2016-12-07 19:55:49
【问题描述】:

我正在开发一个 html 主题并想添加我的表单,我一直在搞乱 css 但这没有用。复选框和单选按钮不可见。这是表格的链接。 http://watisklantenmailen.nl/test/formulier.php 希望有人能帮忙。谢谢!

【问题讨论】:

  • '寻求调试帮助的问题(“为什么这段代码不起作用?”)必须包括所需的行为、特定问题或错误以及在问题中重现它所需的最短代码自己。'
  • 请阅读this。描述确切的问题,提供代码以及您迄今为止尝试过的内容。
  • 对不起,下次我会把我的问题说得更清楚。

标签: php html css


【解决方案1】:

您已经为main.css 中的复选框和单选按钮设置了opacity: 0。删除它,它们将出现在您的页面中。

opacity 设置元素的透明度。因此opacity: 1 表示不透明,而opacity: 0 表示元素完全透明(在页面上不可见)。

input[type="checkbox"], input[type="radio"] {
  -moz-appearance: none;
  -ms-appearance: none;
  appearance: none;
  display: block;
  float: left;
  margin-right: -2em;
  opacity: 0;  // <<==== Remove this property to make checkboxes appear.
}

【讨论】:

    【解决方案2】:

    我检查了你的 css 文件 我发现在 main.css 文件中有以下规则 input[type="checkbox"], input[type="radio"] { -moz-appearance: none; -ms-appearance: none; appearance: none; display: block; float: left; margin-right: -2em; opacity: 0; width: 1em; z-index: -1; } 你应该删除不透明度:0;查看您的复选框

    【讨论】:

      猜你喜欢
      • 2018-02-24
      • 1970-01-01
      • 2015-01-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-10-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多