【问题标题】:Internet Explorer 9 Bootstrap 3 wp-less issueInternet Explorer 9 Bootstrap 3 wp-less 问题
【发布时间】:2014-08-25 13:00:12
【问题描述】:

当我在 Internet Explorer 9 上查看我的网站时,我遇到了一个有线问题,许多 css 类已损坏。换句话说,当我查看源代码时,我发现很多类都没有出现,媒体查询也不存在:

.container {
    width: 768px;
}
.container {
    width: 1008px;
}
.container {
    width: 1008px;
}

而不是像这样显示代码:

@media (min-width: 768px) {
  .container {
    width: 768px;
  }
}
@media (min-width: 960px) {
  .container {
    width: 1008px;
  }
}
@media (min-width: 960px) {
  .container {
    width: 1008px;
  }
}

你认为这个问题的原因是什么? 在编译 bootstrap less 文件时,您认为该问题与 wp-less 有关吗?

谢谢

【问题讨论】:

  • 这可能是因为 IE 9 实际上不支持 Bootstrap,但有一个修复它。
  • Bootstrap 提到了他们的网站:“在 Windows 上,我们支持 Internet Explorer 8-11。”所以他们完全支持它:Getting started。我的问题与以较少的方式呈现 css 类顺序有关。 @buddhistbeast
  • 我的问题有什么更新吗?

标签: css twitter-bootstrap internet-explorer twitter-bootstrap-3 less


【解决方案1】:

首先你永远不会看到这样的编译代码

@media (min-width: 768px) {
  .container {
    width: 768px;
  }
}
@media (min-width: 960px) {
  .container {
    width: 1008px;
  }
}
@media (min-width: 960px) {
  .container {
    width: 1008px;
  }
}

因此,如果您与我们分享您的网站网址会更好,以便我们为您检查。

【讨论】:

  • 实际上网站目前正在本地机器上开发。但是为什么我可以在谷歌浏览器上看到它?我认为 wp-less 没有正常编译它。
  • 是的,这可能是个问题。请尝试使用普通的 css 并检查会发生什么。谢谢
  • 在提交答案之前务必确保@media 始终在 css 文件中!
  • 永远不要要求提供网站 URL。解决代码问题更容易。
猜你喜欢
  • 2013-12-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-11-01
  • 2017-09-24
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多