function setOpacity(eles){
$(eles).each(function(){
if($.browser.msie){
$(this).clone().empty().insertAfter($(this))
.css({"position":"relative","top":-$(this).height()})
.css("z-index",-1).addClass("opacityBgInIE");
$(this).css("background","transparent");
$(this).find('.panel-header,.panel-body').css("background","transparent");
}else{
$(this).addClass("opacitysetting");
$(this).find('.panel-header,.panel-body').css("background","none");
}
});
}
使用方式如下:兄弟连前端培训、HTML5培训
//实现半透明效果
setOpacity("#mainpartopacity,#contents,#frameAccordionMenu");