function loadEvent(){ $(".JS_tabTit li,.JS_tabTit a").on("click",function(e) { $(this).addClass("active").siblings().removeClass("active"); var index = $(".JS_tabTit li,.JS_tabTit a").index(this); $(".JS_tabCon").eq(index).show().siblings().hide(); }); $(".aptitudeStyle li img").each(function() { $(this).click(function() { var src = $(this).attr(‘src‘); $("body").append(‘<div class="browseImg"></div>‘,‘<div class="bodyBg"></div>‘); $(".browseImg").append("<img id=‘slin‘ width=‘150‘ height=‘186‘ src=‘"+src+"‘/>"); $("body").css("overflow","hidden"); $(".bodyBg").click(function() { $(".browseImg").html(""); $("body").css("overflow",""); $(".browseImg,.bodyBg").remove(); }); }); });}
.browseImg { position: fixed; top: 50%; left: 50%; margin: -267px 0 0 -387px; width: 714px; height: 494px; overflow: hidden; border: 1px solid #666666; background:#fff; padding: 20px; z-index: 999;}.browseImg span { position: absolute; top: 0; right: 0; display: block; background:#fff url(../images/icon/pop_close.png) no-repeat center; width: 25px; height: 25px; overflow: hidden; cursor: pointer;}.browseImg img { width:100%; height: 100%;}.bodyBg { position: fixed; top:0; left:0; width: 100%; height: 100%; background:#a0a0a0; filter:alpha(opacity=60); -moz-opacity:0.6; -khtml-opacity: 0.6; opacity: 0.6; z-index: 888; }
时间: 2024-11-03 22:09:49