var screenheight = $(window).height();
$("div.lookBigPicture").css({"left":screenwidth*0.2,"top":screenheight*0.15 $(document).scrollTop(),
"width":screenwidth*0.6, "높이":화면 높이*0.7});
$("img.bigImg").css({"max-width":(screenwidth*0.6 - 30),"max-height":screenheight*0.7-40});
$("img.bigImg").load(function(){
$("img.bigImg").css("top",(화면 높이*0.7 - 30 - $("img.bigImg" ).height())*0.5 30)
});
$("img.bigImg").css("top",(화면 높이*0.7 - 30 - $("img.bigImg").height())*0.5 30);
$.log("$(document).height():" $(document).height());
};
$("a#bigPic").click(function(){
$.log("screenheight:" screenheight "screenwidth:" screenwidth);
str = $("img[img-size ]").attr("src");
$("body").append("
");//灰color底层
$ ("body").append("
");
$("div.grey").css( "height",$(document).height());
loadCSS();
$("body").css({overflow:"hidden"}) //전용滚动条
});
$("body").delegate("div.grey,a.bigpicclose","click",function(){
$("body").css({overflow:"visible"}) ; //恢复滚动条
$("div.lookBigPicture").remove()
$("div.grey").remove()
});
//当浏览器窗口大小改变时
$(window).resize(function () {
loadCSS();
});
复主代码