html - 在 IE 中使用 CSS column-width 时自定义 Bootstrap 复选框呈现错误

标签 html css internet-explorer checkbox bootstrap-4

我使用 Bootstrap(版本 4)的自定义复选框。如果我在它们的父容器中使用 column-width 对齐它们,最后一列中的复选框不会出现在 IE 11 中。在 Chrome 和 FF 中是可以的。

标签文本可见,但包含实际自定义复选框的伪元素不可见。对于此渲染错误,您有任何解决方法吗?

.container {
  column-width: 100px;
}
<script src="https://code.jquery.com/jquery.min.js"></script>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
    <div class="custom-checkbox custom-control">
      <input type="checkbox" class="custom-control-input" id="check1"/>
      <label class="custom-control-label" for="check1">test1</label>
    </div>
    <div class="custom-checkbox custom-control">
      <input type="checkbox" class="custom-control-input" id="check2"/>
      <label class="custom-control-label" for="check2">test2</label>
    </div>
    <div class="custom-checkbox custom-control">
      <input type="checkbox" class="custom-control-input" id="check3"/>
      <label class="custom-control-label" for="check3">test3</label>
    </div>
    <div class="custom-checkbox custom-control">
      <input type="checkbox" class="custom-control-input" id="check4"/>
      <label class="custom-control-label" for="check4">test4</label>
    </div>
    <div class="custom-checkbox custom-control">
      <input type="checkbox" class="custom-control-input" id="check5"/>
      <label class="custom-control-label" for="check5">test5</label>
    </div>
    <div class="custom-checkbox custom-control">
      <input type="checkbox" class="custom-control-input" id="check6"/>
      <label class="custom-control-label" for="check6">test6</label>
    </div>
</div>

您可以在此处查看 JSBin 演示:https://jsbin.com/micodetolo/1/edit?html,css,output

最佳答案

_reboot.scss 中的标签 css 类有 display : inline-block 导致此问题。

enter image description here

关于html - 在 IE 中使用 CSS column-width 时自定义 Bootstrap 复选框呈现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58592000/

相关文章:

html - 在容器中设置文本以在跨度之间自动换行,但在跨度内的空格上不换行(理想情况下,使用 CSS)

html - 在 CSS 中覆盖以前的背景

javascript - 在输入组中引导 5 个 float 标签

html - IE 9 中无法加载字体

internet-explorer - FB.UI 显示对话框在 IE9 中在 iframe 应用程序中被阻止, 'only secure content is displayed'

javascript - 使 div 在悬停时可见

javascript - 为什么元素加载空白不透明度?还有为什么我的js取消了悬停效果?

css - MediaWiki 中页面标题旁边图像的绝对定位

php - HTML 列表选择 <li> 调用 php 应用程序

java - Internet Explorer 中的内存不足问题