【问题标题】:nth-child(2n) not supported by ie8ie8 不支持 nth-child(2n)
【发布时间】:2015-06-23 04:33:04
【问题描述】:

我有这个 css 女巫可以完美地与所有浏览器 exept ie8 配合使用 这是我的CSS

.team-list.list2:nth-child(2n) li {
        margin: 0 0 0 56px;
    }

.team-list:nth-child(2n) {
    margin: 0 -100px 0 -150px;
}

    .team-list:nth-child(2n) li {
        margin: -101px 0 0 73px;
    }

如何使其与ie8兼容

我尝试添加 selectvizir 但它不起作用我知道有一个 jquery 解决方案但我在 jquery 中很新手所以你能帮我找到解决方案吗?

【问题讨论】:

标签: css internet-explorer-8 css-selectors


【解决方案1】:

对于 IE8,您可以添加以下脚本,它应该像任何现代 SANE 浏览器一样运行 :)

    <!--[if lt IE 9]>
        <script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
    <![endif]-->

您查看其他 IE 脚本here

【讨论】:

  • 你试过nth-child(even)吗?
  • 如何使用它?而不是 .team-list.list2:nth-child(2n) li 我把 .team-list.list2:nth-child(even)?
  • 是的,还要检查您使用的脚本是IE9.js,它应该支持版本 5.5 到版本 8
猜你喜欢
  • 2013-05-26
  • 2017-11-05
  • 2012-01-19
  • 1970-01-01
  • 2013-10-08
  • 1970-01-01
  • 2013-05-28
  • 1970-01-01
  • 2013-01-13
相关资源
最近更新 更多