【问题标题】:Bootstrap Dropdown doesn't style correctly in Internet Explorer引导下拉菜单在 Internet Explorer 中的样式不正确
【发布时间】:2015-03-26 22:56:36
【问题描述】:

我在我的 Angular 项目中使用 twitter 引导类。对于下拉菜单,样式在 Chrome 中可以正常工作,但是当我将其加载到 IE 11 时,它的样式不正确。特别是下拉箭头按钮。

还有其他人在 IE 上遇到过这个问题吗?我将如何解决这个问题?请在下面查看我的问题的比较照片。

下面还有我的html部分,欢迎任何cmets提前谢谢!

 <select class=" btn btn-default"  ng-options="obj for obj in data.finding"
                      ng-model="gapSection.finding"  >
                      <option value="">Please select</option>
</select>

【问题讨论】:

  • 我确认使用 Bootstrap 3.3.2 时就是这种情况。
  • 感谢您的澄清。

标签: css twitter-bootstrap


【解决方案1】:

Bootstrap 3 放弃了对 Internet Explorer 7 的支持,但您可以通过简单地添加名为 bootstrap-ie7.css 的条件 CSS 来重新添加它。

这里是下载链接:: https://github.com/coliff/bootstrap-ie7

【讨论】:

  • 作者说的是IE11。
【解决方案2】:

将此添加到您的 css 文件中

select::-ms-expand {
  display: none;
}

【讨论】:

  • 你可能想解释你的代码做了什么/为什么你认为它会解决问题(也许链接到一些来源?)。
【解决方案3】:

我刚刚解决了 IE 使用:

select::-ms-expand {
    border:none;
    background:#fff;
}

Source

【讨论】:

    【解决方案4】:

    我认为您应该在 HTML 标记 select 上使用引导类 form-control 以使其正确呈现:

    <select class="form-control">
      <option>1</option>
      <option>2</option>
      <option>3</option>
    </select> 
    

    【讨论】:

      猜你喜欢
      • 2014-08-22
      • 1970-01-01
      • 2012-10-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-05-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多