css_+_IE8无效解决方法

1. IE8,IE7下 CSS相邻选择器无效,jQuery多属性选择器无效
解决方法: CSS相邻选择器,替换方法为,使用jQuery的next()方法和CSS()方法,
jQuery多属性选择器无效,替换方法为,使用jQuery的单属性方法和children()方法
1.1

```
替换前
.content_a + td{
  color: #fff;
}
```
替换后
```
jQuery('.content_a').next().css('color','#fff');
```

1.2

替换前
```
jQuery('span[name="receiving_status"][class!="x-hidden"]').each(function(i, domEl){
  jQuery(domEl).parent().css('background-color',jQuery(domEl).attr('bgcolors'));
})
```
替换后
```
jQuery('.content_a').next().children('span[class!="x_hidden"]').each(function(i, domEl){
  jQuery(domEl).parent().css('background-color',jQuery(domEl).attr('bgcolors'));
}); 
```

  

原文地址:https://www.cnblogs.com/alisonGavin/p/7232347.html