六盘水钟山天气预报

.op_weather4_twoicon{width:100%;height:250px;position:relative;}.op_weather4_twoicon_bg{width:100%;/*默认展开,没有下拉图标所以高度-20px*/height:250px;position:absolute;z-index:1;}/*-----所有列-----*/.op_weather4_twoicon_day,.op_weather4_twoicon_today{position:absolute;width:89px;height:268px;text-decoration:none;color:#fff;border:none;z-index:20;outline:none;}.op_weather4_twoiconp{text-align:center;font-size:12px;text-shadow:1px1px1px#555;line-height:1em;}.op_weather4_twoicon.op_weather4_twoicon_weath{font-size:13px;}/*日期*/.op_weather4_twoicon_date{margin-top:42px;}.op_weather4_twoicon.op_weather4_twoicon_date_day{margin-top:8px;filter:alpha(opacity=50);opacity:0.5;text-shadow:none}/*天气图标*/.op_weather4_twoicon_icon{width:50px;height:50px;background:no-repeat;background-size:cover;margin:20px0020px;}.op_weather4_twoicon_temp{margin-top:22px;}.op_weather4_twoicon_weath{z-index:12;margin-top:12px;}.op_weather4_twoicon_wind{margin-top:11px;}/*列表分隔竖线*/.op_weather4_twoicon_split{position:absolute;left:0px;top:42px;width:1px;height:215px;background:#fff;filter:alpha(opacity=15);opacity:0.15;}.op_weather4_twoicon_hover{z-index:-1;position:absolute;width:89px;height:268px;}.op_weather4_twoicon_day:hover.op_weather4_twoicon_hover{background-image:-webkit-linear-gradient(top,rgba(255,255,255,.015),rgba(255,255,255,.15));background-image:-o-linear-gradient(top,rgba(255,255,255,.015),rgba(255,255,255,.15));background-image:-ms-linear-gradient(top,rgba(255,255,255,.015),rgba(255,255,255,.15));background-image:-moz-linear-gradient(top,rgba(255,255,255,.015),rgba(255,255,255,.15));filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr=#04FFFFFF,EndColorStr=#40FFFFFF);}/*-----第一列天气-----*/.op_weather4_twoicon_today{width:186px;}.op_weather4_twoicon_today.op_weather4_twoicon_date{text-align:left;margin:16px0012px;width:300px;}.op_weather4_twoicon_today.op_weather4_twoicon_icon{width:50px;height:50px;margin:16px0060px;}.op_weather4_twoicon_tempsup{vertical-align:baseline;}.op_weather4_twoicon_shishi{text-align:center;}.op_weather4_twoicon_shishi_info{position:relative;}.op_weather4_twoicon_shishi_title{font-size:48px;line-height:64px;display:inline-block;font-family:Arial;text-shadow:1px1px1px#555;}.op_weather4_twoicon_shishi_data{position:relative;display:inline-block;}.op_weather4_twoicon_shishi_sup,.op_weather4_twoicon_shishi_sub{display:block;text-align:left;font-style:normal;text-shadow:1px1px1px#555;}.op_weather4_twoicon_today.op_weather4_twoicon_temp{margin-top:8px;}.op_weather4_twoicon_realtime_quality_wrap{width:100%;text-align:center;}.op_weather4_twoicon_realtime_quality_today{display:inline-block;min-width:38px;height:19px;line-height:19px;border-radius:3px;background-color:#82c91e;margin:0pxauto;margin-top:12px;text-align:center;padding:06px;}.op_weather4_twoicon_aqi_text_today{margin-left:4px;}.op_weather4_twoicon_aqi_text{display:block;width:38px;height:19px;line-height:19px;border-radius:3px;margin:0pxauto;margin-top:12px;text-align:center;}.op_weather4_twoicon_realtime_quality_wrap.op_weather4_twoicon_realtime_quality_today,.op_weather4_twoicon_realtime_quality_wrap.op_weather4_twoicon_aqi_text{font-family:arial,'微软雅黑';}/*空气质量块背景色*/.op_weather4_twoicon_aqi_level_0_bg{background-color:#cacaca;}.op_weather4_twoicon_aqi_level_1_bg{background-color:#40c057;}.op_weather4_twoicon_aqi_level_2_bg{background-color:#82c91e;}.op_weather4_twoicon_aqi_level_3_bg{background-color:#f76707;}.op_weather4_twoicon_aqi_level_4_bg{background-color:#e03131;}.op_weather4_twoicon_aqi_level_5_bg{background-color:#841c3c;}.op_weather4_twoicon_aqi_level_6_bg{background-color:#540822;}document.createElement("canvas");

天气预报_一周天气预报_中国天气-最近访问:

℃(实时)

暂无

暂无

暂无

暂无

暂无其他用户还搜索了:-给百度提建议A.setup('weather4_twoicondata',{'url':"http%3A%2F%2Fwww.baidu.com%2Fweather%2F101260805",'oq':"",'fetchkey':"",'resourceid':"4514",'swfurl':"",'swfon':"",'swfoff':"",'swfcondition':"",'snowlevel':"",'warn':"",'folder':"",'originQuery':"",'srcid':"4514",'fswdaxes':"",'fswdi':'null','syncFswdaxes':'null','syncFlfxaxes':'null','flfx':'null','flfxi':'null','jsl':'null','jsli':'null','xgzs':'null','fswdiaxes':'null','flfxiaxes':'null'});A.init(function(){var_this=this,wtimer,snowInterval,//产生雪花intervalsnowStopHover=false,//雪花特效时取消hover切换效果moveInterval=null,//雪花移动intervalhideInterval=null;//雪花渐隐消失intervalvarweather4_twoicondata=_this.data.weather4_twoicondata;vartid=-1;varscene;//==========================================================================================//新版天气脚本byzhangjiachen//==========================================================================================var$UA=navigator.userAgent;var$IE=$UA.match(/MSIE(\d+)/);$IE=$IE&&+$IE[1];if($IE){vardummy=document.createElement('iframe');document.body.appendChild(dummy);$UA=dummy.contentWindow.navigator.userAgent;$IE=+$UA.match(/MSIE(\d+)/)[1];document.body.removeChild(dummy);dummy=null;var$IE6=($IE==6);var$IE78=($IE==7||$IE==8);}functionURL(path){return'//www.baidu.com/aladdin/img/new_weath/'+path;}functiongetProtocalUrl(url){varreg=/^http:\/\/www.baidu.com/;if(reg.test(url)){url=url.replace("http:","");}returnurl;}varefUsed={},efFact={};varlayerLight;vardefEff,curEff;functioncheckCanvas(){return'getContext'indocument.createElement('canvas');}functionloadEff(e){varres=e.RES;for(vari=res.length-1;i>=0;i--){res[i]=URL(res[i]);}scene.loadImages(res,function(){e.loaded=true;});}functionrenderEff(){if($IE6)return;for(varkinefUsed){if(efUsed.hasOwnProperty(k)){vare=efUsed[k];if(!e.loaded)continue;varlast=e.alpha;e.alpha+=ALPHA_DELTA;if(e.alpha>0){e.render();if(!$IE78){//淡出中,此过程图层内容仍保持更新if(e.alpha<1.0){e.layer.setOpacity(e.alpha);}}}else{//已消失,隐藏图层if(last>0){e.layer.setVisible(false);}}}}}functionsetEff(effArgs){if($IE6)return;for(varkincurEff){if(curEff.hasOwnProperty(k)){if($IE78)efUsed[k].layer.setVisible(false);efUsed[k].alpha=1.0;}}//显示的特效层for(varkineffArgs){if(effArgs.hasOwnProperty(k)){vare=efUsed[k];if(!e.loaded&&!e.loading){e.loading=true;loadEff(e);}e.arg=effArgs[k];e.alpha=9e9;e.layer.setVisible(true);if(!$IE78)e.layer.setOpacity(1.0);}}curEff=effArgs;}functioninitEff(){ if($IE6)return;varopt;if(checkCanvas()){opt={useCanvas:true,autoClear:true};}for(varkinefFact){if(efFact.hasOwnProperty(k)){//初始化特效varexports={};efFact[k](exports);exports.layer=scene.Layer('eff-'+k,opt);exports.layer.setZIndex(1.0);exports.layer.setVisible(false);efUsed[k]=exports;}}layerLight=scene.Layer('light');layerLight.setOpacity(0);layerLight.setColor('#fff');}////背景渐变//varCANVAS_W=538,CANVAS_H=268,ALPHA_DELTA=-0.03;varlayers_bg={};varfading;varopacity;vardefBg,curBg;vardivOldBg;//IE下使用滤镜半透明varsetAlpha='opacity'indocument.body.style?function(el,v){el.style.opacity=v}:function(el,v){varflt=el._flt;if(!flt){el.style.filter+='alpha';flt=el._flt=el.filters.alpha;}flt.opacity=v*100;};functionsetBg(bg){if(bg==curBg){return;}vardivBg=layers_bg[bg];//首次背景if(opacity>0){setAlpha(divOldBg,0);divOldBg.style.display='none';opacity=1-opacity;}else{opacity=1;}divOldBg=layers_bg[curBg];//旧背景放前面,逐渐淡出divOldBg.style.zIndex=2;setAlpha(divOldBg,1.0);//新背景放后面,逐渐深入divBg.style.zIndex=1;divBg.style.display='block';setAlpha(divBg,1.0);curBg=bg;fading=true;}functionrenderBg(){opacity+=ALPHA_DELTA;if(opacity<0){divOldBg.style.display='none';fading=false;}else{setAlpha(divOldBg,opacity);}}////hover高亮//functionhandleOver(){if(snowStopHover){return;}if(tid!=-1){clearTimeout(tid);tid=-1;}varbg=this.getAttribute('weath-bg');setBg(bg);setEff(this.eff);}functionhandleOut(){if(snowStopHover){return;}tid=setTimeout(function(){setBg(defBg);setEff(defEff);},20);}functionrender(){if(fading){renderBg();}renderEff();}functioninitAni(){scene=A.ui.sjs.Scene({w:CANVAS_W,h:CANVAS_H,parent:_this.qq('op_weather4_twoicon')});scene.dom.style.zIndex=10;initEff();setEff(defEff);varticker=scene.Ticker(1000/60,render);ticker.run();}functioninit(){//hovervararr=_this.q('op_weather4_twoicon_today').concat(_this.q('op_weather4_twoicon_day'));for(vari=arr.length-1;i>=0;i--){varcolumn=arr[i];//获取特效属性vareff=column.getAttribute('weath-eff');if(eff){eff=newFunction('return'+eff)();column.eff=eff;//默认的动画(当天)if(i==0){defEff=eff;}}//获取背景属性if(i==0){curBg=defBg=column.getAttribute('weath-bg');}if($IE){column.onmouseenter=handleOver;column.onmouseleave=handleOut;}else{column.onmouseover=handleOver;column.onmouseout=handleOut;}}////获取背景层元素//arr=_this.q('op_weather4_twoicon_bg');for(i=arr.length-1;i>=0;i--){varname=arr[i].getAttribute('bg-name');layers_bg[name]=arr[i];}A.use('sjs',initAni);}wtimer=setTimeout(init,1);//====================================================================================================//flash.jsstartvarCF=new(function(){varfdf=false;varcheckflash;varhide;varhidebr;varcreatFlash;varcheck;varfirstbr=true;varclickURL="//www.baidu.com/aladdin/flash/weather/index.swf";//给flash加上时间参数functionaddTimeStamp(url,param){if(!url)returnfalse;varregexp=newRegExp('(\\?|&)('+param+'=[^&$]*)');if(regexp.test(url)){url=url.replace(regexp,function(s0,s1,s2){returns1+s2+newDate().getTime();});returnurl;}else{if(url.indexOf('?')>0){returnurl+='&'+param+'='+newDate().getTime();}else{returnurl+='?'+param+'='+newDate().getTime();}}}//setFDFfunctionsetFDFfunction(){fdf=true;returnfdf;}//creatFlashfunctioncreatFlashfunction(murl,mt,url,width,height,fq,showurl,base,container,noshowurl,cURL){//setclickURLif(cURL!=="")clickURL=cURL;varstr="";if(mt){str+=""+mt+"";}str+="";str+="";str+="

";str+="

";str+="

";str+="

";str+="

";str+="

";str+="

";str+="";str+="";if(!noshowurl){str+=""+showurl+"-";str+="";}if(container){container.innerHTML=str;}else{document.write(str);}}//getVersionfunctiongetVersion(){varn=navigator;if(n.plugins&&n.mimeTypes.length){vara=n.plugins["ShockwaveFlash"];if(a&&a.description){returna.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s)+r/,".")+".0";}}elseif(window.ActiveXObject&&!window.opera){for(vari=10;i>=2;i--){try{varc=newActiveXObject('ShockwaveFlash.ShockwaveFlash.'+i);if(c){varversion=c.GetVariable("$version");version=version.replace(/WIN/g,'');version=version.replace(/,/g,'.');returnversion;break;}}catch(e){return"1.0.0";}}}return"1.0.0";}//hideFunctionfunctionhidefunction(flashid,callback){if(callback){callback();returnfalse;}varfid=flashid?flashid:'flash';varflash=document.getElementById(fid);try{varft=al_c(flash);varft=document.getElementById(ft);ft.style.display="none";}catch(e){}}//hidebrfunctionfunctionhidebrfunction(id){varflash_version=getVersion().split('.');varhasFlash=false;if(flash_version[0]>9)hasFlash=true;if(flash_version[0]==9&&flash_version[1]>0)hasFlash=true;if(flash_version[0]==9&&flash_version[1]==0&&flash_version[2]>=28)hasFlash=true;varfid=id?id:'flash';varflash=document.getElementById(fid);varft=al_c(flash);varft=document.getElementById(ft);varfb=ft.nextSibling;if(!hasFlash&&(firstbr==true)){fb.style.display="none";}elseif(!firstbr&&(!fdf)){fb.style.display="none";}firstbr=false;}varswfVersion=(function(){varn=navigator;if(n.plugins&&n.mimeTypes.length){varplugin=n.plugins["ShockwaveFlash"];if(plugin&&plugin.description){returnplugin.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s)+r/,".")+".0";}}elseif(window.ActiveXObject&&!window.opera){for(vari=12;i>=2;i--){try{varc=newActiveXObject('ShockwaveFlash.ShockwaveFlash.'+i);if(c){varversion=c.GetVariable("$version");returnversion.replace(/WIN/g,'').replace(/,/g,'.');}}catch(e){}}}})();//checkflashversionfunctioncheckflashversion(flashid,callback){//varflash_version=getVersion().split('.');varversion=swfVersion||'1.0.0';varflash_version=version.split('.');varhasFlash=false;if(!flash_version){hasFlash=false;}else{if(flash_version[0]>9)hasFlash=true;if(flash_version[0]==9&&flash_version[1]>0)hasFlash=true;if(flash_version[0]==9&&flash_version[1]==0&&flash_version[2]>=28)hasFlash=true;}if(!hasFlash){c({'fm':'inlo','url':clickURL,'p1':_this.p1,'p2':1,'tp':"6"});hidefunction(flashid,callback);}elsec({'fm':'inlo','url':clickURL,'p1':_this.p1,'p2':1,'tp':"7"});}//checkfunctionfunctioncheckfunction(){if(fdf){c({'fm':'inlo','url':clickURL,'p1':getFlashP1(),'p2':1,'tp':"8"});returntrue;}else{c({'fm':'inlo','url':clickURL,'p1':getFlashP1(),'p2':1,'tp':"9"});hidefunction();hidebrfunction();}}//returnreturn{hidebr:function(id){hidebrfunction(id);},hide:function(id,callback){hidefunction(id,callback);},checkflash:function(id,callback){checkflashversion(id,callback);},check:function(){checkfunction();},creatFlash:function(murl,mt,url,width,height,fq,showurl,base,container,noshowurl){creatFlashfunction(murl,mt,url,width,height,fq,showurl,base,container,noshowurl);},setFDF:function(){returnsetFDFfunction();}};})();//flash.jsendif(weather4_twoicondata.swfon){varurl=getProtocalUrl(weather4_twoicondata.url);varswfon=weather4_twoicondata.swfon;varswfoff=weather4_twoicondata.swfoff;var$flashContainer=_this.find('.op_weather4_twoicon_flash');var$open=_this.find('.op_weather4_twoicon_open').eq(0);var$close=_this.find('.op_weather4_twoicon_close').eq(0);varhideFlashContainer=function(){var$c=_this.find('.op_weather4_twoicon_swf_container').eq(0);if($c.length>0){$c.hide();}};if($flashContainer.html()==''){varfq='fq='+encodeURI(weather4_twoicondata.swfcondition)+'&from=baidu';varfdf;CF.checkflash('op_weather4_twoicon_flash',hideFlashContainer);CF.creatFlash(getProtocalUrl(weather4_twoicondata.url),'',getProtocalUrl(weather4_twoicondata.swfurl),'512','385',fq,'','',$flashContainer.get(0),'noshowurl');}if($open.length>0&&$close.length>0){$open.on('click',function(){$close.css('display','inline-block');$open.hide();$flashContainer.show();});$close.on('click',function(){$open.show();$close.hide();$flashContainer.hide();});}}varsnows=[];if(weather4_twoicondata.snowlevel&&!$IE6){snowStopHover=true;varsnowlevel=weather4_twoicondata.snowlevel;functioninitFn(){varsnowNum=55-18*(3-snowlevel),//雪花总数r_con=_this.find('#content_right').get(0);//右侧信息容器//雪花,index为在雪花数组snows[]中的索引varsnow=function(index){varscreenWidth=document.documentElement.clientWidth||document.body.clientWidth,//屏幕宽度screenHeight=document.documentElement.clientHeight||document.body.clientHeight,//屏幕高度scale=Math.random()*1-0.3,//飘落雪花放大缩小系数size=Math.ceil(16*(1+scale)),//雪花尺寸snowX=Math.random()*(screenWidth-100),//雪花初始化X坐标snowY=0,//雪花初始化Y坐标speedX=0,//雪花X速度angleX=0,//雪花X角速度(正弦函数X增加)speedY=parseInt(snowlevel,10)+Math.random()*3,//Y速度amplitude=Math.random()*3,//雪花正弦轨迹振幅opacity=1,//透明度img=null,//雪花dommoveInterval=null,//雪花移动intervalhideInterval=null,//雪花渐隐消失interval_this=this;if(Math.random()-0.5>0){//计算speedX,随机正弦向左/向右speedX=(0.01+Math.random()/100);}else{speedX=-(0.01+Math.random()/100);}vardraw=function(){//画雪花domimg=document.createElement('img');varbgNum=Math.ceil(Math.random()*100)%100;//初始化4种雪花,第4种圆形最少if(bgNum>95){bgNum=4;}elseif(bgNum65){bgNum=3;}elseif(bgNum35){bgNum=2;}elseif(bgNum0){bgNum=1;}else{bgNum=1;}varcssStyle={'position':'absolute','zIndex':'10000000','opacity':opacity,'width':(size+'px'),'height':(size+'px')};img.src='//www.baidu.com/aladdin/img/weather4_twoicon/snowflake'+bgNum+'.png';for(variincssStyle){if(cssStyle.hasOwnProperty(i)){img.style[i]=cssStyle[i];}}img.style.left=snowX+'px';img.style.top=snowY+'px';document.body.appendChild(img);};varmove=function(){//雪花移动angleX+=speedX;snowX=snowX+amplitude*Math.sin(angleX);snowY+=speedY;varscreenWNow=document.documentElement.clientWidth||document.body.clientWidth,screenHNow=document.documentElement.clientHeight||document.body.clientHeight;if(50=0){opacity-=0.2;img.style.opacity=opacity;}else{destory();//销毁本雪花snows[index]=newsnow(index);//同时在创建一个雪花}},50);}}};vardestory=this.destory=function(){//销毁雪花clearInterval(hideInterval);clearInterval(moveInterval);if(img.parentNode){img.parentNode.removeChild(img);}_this=null;};varinit=function(){//初始化雪花draw();moveInterval=setInterval(function(){move();},50)};init();};functioninitSnow(){//初始化产生20个雪花,每隔300ms再创建一个varinitSnowNum=10+3*snowlevel;for(vari=0;i0){$firstSnowDiv.show();$firstSnowBtn.on('click',function(){//关闭特效snowStopHover=false;clearInterval(snowInterval);for(vari=0;i0?curCity+';'+cityList.join(';'):curCity;storage.set('op_weather4_twoicon_city',escape(setStorige));}});this.dispose=function(){if(snows.length>1){for(vari=0;i风向:"+(flfx?flfx:"无")+"

风力:"+flfl+"

");canvas.onmousemove=function(ev){if(!fl)editArc(this.children[0],w+4,h+4,l,t,"0-7px");if(fl)this.children[2].style.display="block"},canvas.onmouseout=function(ev){if(!fl)editArc(this.children[0],w,h,l,t,"03px");if(fl)this.children[2].style.display="none"}}functioneditArc(o,w,h,l,t,xy){o.style.width=w+"px",o.style.height=h+"px",o.style.left=l-w/2+1+"px",o.style.top=t-h/2-1.5+"px",o.style.backgroundPosition=xy}functionmoveArea(mouseX){for(vari=0;i=i*divide&&mouseX0)xlbgie.each(function(i,o){o.style.height=132+warH-20+"px"});if(xlclose.length>0)xlclose.on("click",function(){if(xltwoiconBg.each(function(i,o){o.style.height=H+xlHClose+warH+"px"}),browserIE&&xlbgie.length>0)xlbgie.each(function(i,o){o.style.height=132+warH-20+"px"});xltabcontent.css("display","none"),xltwoicon.css("height",H+xlHClose),xlopen.css("display","block"),xlclose.css("display","none")});if(xlopen.length>0){_this.find(".op_weather4_xlleftfswd").html(""),_this.find(".op_weather4_xlleftflfx").html(""),jslulDom.html("");var_data=_this.data.weather4_twoicondata;fswd=$.parseJSON(_data.fswdi),flfx=$.parseJSON(_data.flfxi),xgzs=$.parseJSON(_data.xgzs),fswdaxes=$.parseJSON(_data.fswdiaxes)[0],flfxaxes=$.parseJSON(_data.flfxiaxes)[0],jsl=$.parseJSON(_data.jsli),tabAjax=1;varcurrentTime,nextTime;if(currentTime=newDate(fswd[0].t),nextTime=newDate(fswd[1].t),nextTime.valueOf()-currentTime.valueOf()

相关标签

热点关注

随机推荐


友情链接: