IE6中是否有针对子选择器的修复程序 [英] Is there any Fix for child selector in IE6

查看:69
本文介绍了IE6中是否有针对子选择器的修复程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在CSS中使用:first-child:last-child时,它在IE7,FF中运行正常.

While using :first-child :last-child , in css its works fine in IE7, FF.

对此是否有任何可能的解决方法.

Is there any possible fix for this.

可以使用Javascript.如果没有javascript就能使用,那就太好了.

Use of Javascript is fine. If it works without javascript it would be great.

推荐答案

谢谢,

这是我最终用于此解决方案的javascript版本.

Here is the javascript version which I finally used for this Solutions.

  <script>

  $(document).ready(function(){
    $("ul li:last-child").addClass("last");
    $("ul li:first-child").addClass("first");

  });
  </script>

这篇关于IE6中是否有针对子选择器的修复程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆