海天的页首,暂无

前端培训教程 jquery半透明设置

     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");

posted @ 2016-11-25 15:49  海天网  阅读(125)  评论(0编辑  收藏  举报
海天的页脚,暂无