| + | .box{ width:1100px; height:2000px; margin-left:auto; margin-right:auto; background-image:url('img/1.jpg'),url('img/2.jpg'),url('img/3.jpg'),url('img/4.jpg'); background-repeat:no-repeat; background-position:right 150px,left 500px,960px 800px,800px 100px;} |
− | $(function(){$.qReport(1);$.stellar({horizontalScrolling:false,verticalOffset:40});$("#topNav").navtab();$("#crossbanenr").picfade({timerange:3000});$("body").pgvClick();if(window.pgvMain){window.pgvMain()}swfobject.embedSWF("http://im.qq.com/online/flash/flash20140304.swf","flashBox","910","700","9.0.0","expressInstall.swf");$("#viewOnline").click(function(e){e.preventDefault();$("#flashDiv").show();$("#overlay").css({opacity:"0.9"}).fadeIn();$("#overlay").css({height:$(document).height()})});$("#flashClose").click(function(e){e.preventDefault();$("#flashDiv").hide();$("#overlay").fadeOut()});window.online_resp=function(data){if(data&&data.c){$("#cur_online").text(data.c.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"))}};$.getJSON("http://mma.qq.com/cgi-bin/im/online&callback=?",function(data){});var cookie={get:function(n){var m=document.cookie.match(new RegExp("(^| )"+n+"=([^;]*)(;|$)"));return !m?"":decodeURIComponent(m[2])},set:function(name,value,domain,path,hour){var expire=new Date();expire.setTime(expire.getTime()+(hour?3600000*hour:30*24*60*60*1000));document.cookie=name+"="+value+"; expires="+expire.toGMTString()+"; path="+(path?path:"/")+"; "+(domain?("domain="+domain+";"):"")},del:function(name,domain,path){document.cookie=name+"=; expires=Mon, 26 Jul 1997 05:00:00 GMT; path="+(path?path:"/")+"; "+(domain?("domain="+domain+";"):"")},uin:function(){var u=cookie.get("uin");return !u?null:parseInt(u.substring(1,u.length),10)}};var htmlEncodeDict={'"':"#34","<":"#60",">":"#62","&":"#38"," ":"#160"};var encodeHtml=function(s){s+="";return s.replace(/["<>& ]/g,function(all){return"&"+htmlEncodeDict[all]+";"})};window.loginAll=function(json){if(json&&json.result==0){uin=cookie.uin();$("#login").hide();$("#nick").html("hi,"+encodeHtml(json.nick));var $loginImg=$('<img id="loginImg" src="'+json.Face+'" alt="" />').insertAfter("#login");$("#loginInfo").addClass("logined");$("#loginInfo").hover(function(){if($(this).hasClass("logined")){$("#loginPenel").slideDown(300)}},function(){$("#loginPenel").hide()})}};try{var uin=cookie.uin();var skey=cookie.get("skey");if(!!uin){$.getScript("http://qfwd.qq.com/?uin="+uin+"&skey="+skey+"&func=loginAll&refresh=0&ran="+Math.random(),function(){})}}catch(e){}window.ptlogin2_onClose=function(){$("#login_div").hide();$("#overlay").fadeOut()};window.ptlogin2_onResize=function(width,height){$("#login_div").css({width:width,height:height,visibility:"hidden"}).css("visibility","visible")};function str2JSON(str){eval("var __pt_json="+str);return __pt_json}if(typeof window.postMessage!=="undefined"){window.onmessage=function(event){var msg=event||window.event;var data;if(typeof JSON!=="undefined"){data=JSON.parse(msg.data)}else{data=str2JSON(msg.data)}switch(data.action){case"close":ptlogin2_onClose();break;case"resize":ptlogin2_onResize(data.width,data.height);break;default:break}}}var showLogin=function(){var loginWin=$("#login_div");var _url=window.location.href;if(!loginWin.length){loginWin=$('<div id="login_div" class="login_div"><iframe name="login_frame" frameborder="0" scrolling="auto" width="100%" height="100%" src="http://xui.ptlogin2.qq.com/cgi-bin/xlogin?appid=501038301&proxy_url=http%3A%2F%2Fid.qq.com%2Flogin%2Fproxy.html&s_url='+encodeURIComponent(_url)+'"></iframe></div>');loginWin.appendTo($("body"))}$("#overlay").css({opacity:"0.5"}).fadeIn();$("#overlay").css({height:$(document).height()});loginWin.show()};$("#login").click(function(e){e.preventDefault();showLogin()});$("#lgout").click(function(e){e.preventDefault();cookie.del("uin",".qq.com");cookie.del("skey",".qq.com");cookie.del("uin","im.qq.com");cookie.del("skey","im.qq.com");$("#loginPenel").hide();$("#login").show();$("#loginImg").hide();$("#loginInfo").removeClass("logined")});var mod=$(".qfigure");var $body=$("body");var dataArr=[];$(mod).each(function(i,item){if(i===0){dataArr[i]=$(item).offset().top-Math.floor($(item).height()/2)-500}else{dataArr[i]=$(item).offset().top-Math.floor($(item).height()/2)}});var winHeight=$(window).height();var bodyheight=$body.height();$(".crossbanenr").animate({height:(winHeight-150)>540?(winHeight-150):540},100,function(){});$(window).resize(function(){winHeight=$(window).height();bodyheight=$body.height();$(".crossbanenr").animate({height:(winHeight-150)>540?(winHeight-150):540},100,function(){})});var isIE=!!window.ActiveXObject;var scrollTop=$(window).scrollTop();var clientHeight=$(window).height();var contentHeight=584;var barHeight=600;var firstHeight=778;var topHeight=321;var thirdScroll=clientHeight<(topHeight+firstHeight)?contentHeight:(contentHeight-clientHeight+topHeight+firstHeight);var fourthScroll=thirdScroll+contentHeight+barHeight;var fifthScroll=fourthScroll+contentHeight+barHeight;var sixthScroll=fifthScroll+contentHeight+barHeight;var changeH=(firstHeight+topHeight-clientHeight)/2;var st=new Date().getTime();$(window).scroll(function(e){scrollTop=$(window).scrollTop();if(scrollTop>=firstHeight){$("#topbar").addClass("topicfixed")}else{if($("#topbar").hasClass("topicfixed")){$("#topbar").removeClass("topicfixed")}}if(scrollTop<100){$body.attr("id","pg0")}$(dataArr).each(function(i,item){if(Math.floor(winHeight/2)+scrollTop>=item){$body.attr("id","pg"+(i+1))}});if(scrollTop+winHeight>=bodyheight){$body.attr("id","pg3")}})});
| |