经典滑动门技术

原创 2012年03月29日 06:47:22

//head头部包含下列JS

<script language="javascript" type="text/javascript" src="{dede:global.cfg_templets_skin/}/script/jquery-1.js"></script>

<script language="javascript" type="text/javascript" src="{dede:global.cfg_templets_skin/}/script/js_index_t-min.js"></script>

//js_index_t-min.js代码如下

function calendar_index(){var j=0;var y=new Date();var s;var z;var a="";if(y.getDay()==0){s="\u661f\u671f\u65e5"}if(y.getDay()==1){s="\u661f\u671f\u4e00"}if(y.getDay()==2){s="\u661f\u671f\u4e8c"}if(y.getDay()==3){s="\u661f\u671f\u4e09"}if(y.getDay()==4){s="\u661f\u671f\u56db"}if(y.getDay()==5){s="\u661f\u671f\u4e94"}if(y.getDay()==6){s="\u661f\u671f\u516d"}if(y.getFullYear()<2000){a="19"}date1=a+(y.getFullYear())+"\u5e74"+(y.getMonth()+1)+"\u6708"+y.getDate()+"\u65e5  ";date2=""+s;$("#date").html(date1+date2);var n=new Array(100);var w=new Array(12);var e="\u7532\u4e59\u4e19\u4e01\u620a\u5df1\u5e9a\u8f9b\u58ec\u7678";var l="\u5b50\u4e11\u5bc5\u536f\u8fb0\u5df3\u5348\u672a\u7533\u9149\u620c\u4ea5";var f="\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d\u5341";var b="\u6b63\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d\u5341\u51ac\u814a";var r="\u65e5\u4e00\u4e8c\u4e09\u56db\u4e94\u516d";var o="\u9f20\u725b\u864e\u5154\u9f99\u86c7\u9a6c\u7f8a\u7334\u9e21\u72d7\u732a";var x,d,v,c;n=new Array(2635,333387,1701,1748,267701,694,2391,133423,1175,396438,3402,3749,331177,1453,694,201326,2350,465197,3221,3402,400202,2901,1386,267611,605,2349,137515,2709,464533,1738,2901,330421,1242,2651,199255,1323,529706,3733,1706,398762,2741,1206,267438,2647,1318,204070,3477,461653,1386,2413,330077,1197,2637,268877,3365,531109,2900,2922,398042,2395,1179,267415,2635,661067,1701,1748,398772,2742,2391,330031,1175,1611,200010,3749,527717,1452,2742,332397,2350,3222,268949,3402,3493,133973,1386,464219,605,2349,334123,2709,2890,267946,2773,592565,1210,2651,395863,1323,2707,265877);w[0]=0;w[1]=31;w[2]=59;w[3]=90;w[4]=120;w[5]=151;w[6]=181;w[7]=212;w[8]=243;w[9]=273;w[10]=304;w[11]=334;function k(C,D){return(C>>D)&1}function u(){c=(arguments.length!=3)?new Date():new Date(arguments[0],arguments[1],arguments[2]);var F,C,H,D;var G=false;var E=c.getFullYear();F=(E-1921)*365+Math.floor((E-1921)/4)+w[c.getMonth()]+c.getDate()-38;if(c.getYear()%4==0&&c.getMonth()>1){F++}for(C=0;;C++){D=(n[C]<4095)?11:12;for(H=D;H>=0;H--){if(F<=29+k(n[C],H)){G=true;break}F=F-29-k(n[C],H)}if(G){break}}x=1921+C;d=D-H+1;v=F;if(D==12){if(d==Math.floor(n[C]/65536)+1){d=1-d}if(d>Math.floor(n[C]/65536)+1){d--}}}function h(){var C="";C+=e.charAt((x-4)%10);C+=l.charAt((x-4)%12);C+="\u5e74 ";if(d<1){C+="(\u95f0)";C+=b.charAt(-d-1)}else{C+=b.charAt(d-1)}C+="\u6708";C+=(v<11)?"\u521d":((v<20)?"\u5341":((v<30)?"\u5eff":"\u4e09\u5341"));if(v%10!=0||v==10){C+=f.charAt((v-1)%10)}return C}function g(E,C,D){if(E<1921||E>2020){return""}else{C=(parseInt(C)>0)?(C-1):11;u(E,C,D);return h()}}var m=new Date();var p=m.getFullYear();var t=m.getMonth()+1;var A=m.getDate();var B=m.getDay();var q=parseInt(m.getTime()/1000);$("#todate").html("<table border='0' cellspacing='0' cellpadding='0'><tr><td align='center'  class='b12'><span class='b12'>"+g(p,t,A)+"</span></td></tr></table>")}calendar_index();function SwitchNewsTag(c,a,b){$("#"+c+a+" img.lazyload").each(function(){var d=$(this).attr("data-original");$(this).attr("src",d)});ClearTagClass(c,b);$("#tagname_"+c+a).attr("class","tagf");$("#"+c+a).css({display:""})}function ClearTagClass(b,a){for(i=1;i<=a;i++){$("#tagname_"+b+i).attr("class","tagn");$("#"+b+i).css({display:"none"})}}function frilink(f,d,b,h){var g=(typeof f=="string")?document.getElementById(f):f;var d=d||1000;var b=b||20;var h=h||20;var c=null,j=false;var a=function(){c=setInterval(e,b)};var e=function(){if(j){return}g.scrollTop+=2;if(g.scrollTop%h==0){clearInterval(c);g.appendChild(g.getElementsByTagName("table")[0]);g.scrollTop=0;setTimeout(a,d)}};g.onmouseover=function(){j=true};g.onmouseout=function(){j=false};setTimeout(a,2000)}frilink("IssueList",2000,32,20);$(function(){$("#weibo").toggle(function(){$('<table width="613" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFffff" background="http://www.xinhuanet.com/static/img/titbg.gif" style="background-repeat:repeat-x;border:1px solid #cdd3e3; border-top:none;"><tr><td><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td valign="middle" align="left" style=" font-size:14px; color:#999999; padding-left:20px;">\u5fae\u535a\u767b\u5f55</td><td id="hideweibo" align="right" style="padding:2px 10px 0 0;"><img src="http://www.xinhuanet.com/static/img/banner_wbdl_x.gif"/></td></tr></table></td></tr><tr><td valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="305" align="center" valign="middle"><iframe src="http://t.home.news.cn/regedit2.jsp" hspace="0" vspace="0" height="170" frameborder="0" width="305"></iframe></td><td align="center" valign="middle"><iframe src="http://www.xinhuanet.com/zcwb.html" hspace="0" vspace="0" height="170" frameborder="0" width="308"></iframe></td></tr></table></td></tr></table>').appendTo("#loginn");$("#loginn").show()},function(){$("#loginn").css("display","none");$("#loginn").empty()});$("#hideweibo").click(function(){$("#loginn").css("display","none");$("#loginn").empty()});$("img.lazyload").lazyload({threshold:300});var newscn={};newscn.jG=function(m,l,b,a,p,h){var nc=0,lh;for(var i=0;i<m;i++){eval(" $('#"+h+i+"').mouseover(function(){clearInterval(lh);nc="+i+";pC();}).mouseout(function(){lh = setInterval(pC,"+l+");});")}lh=setInterval(pC,l);function pC(){if(nc>m-1){nc=0}$("#"+p+"Holder ."+a).removeClass(a).addClass(b);$("#"+h+nc).removeClass(b).addClass(a);$("#"+p+"Content div").each(function(idx,item){if(idx==nc){$(item).show()}else{$(item).hide()}});nc++}};newscn.jG(6,4000,"bg","active","Card","mark");newscn.jG(5,4000,"bg","active","Second","marks");newscn.jG(5,4000,"bg","active","SecTitle","marks");$("#home_autodiv").html('<iframe border="0" name="home_auto" marginWidth="0" frameSpacing="0" marginHeight="0" src="http://www.xinhuanet.com/2011auto_iframe.htm" frameBorder="0" noResize width="650" height="140" scrolling="no" vspale="0"></iframe>');$("#keyword").html('<iframe border="0" name="home_key" marginWidth="0" frameSpacing="0" marginHeight="0" src="http://www.xinhuanet.com/home_div_iframe_20110720.htm" frameBorder="0" noResize width="980" height="32" scrolling="no" vspale="0"></iframe>');$("#headlogin2div").html('<iframe id="headlogin2" src=\'http://www.xinhuanet.com/2011ad_iframe.htm\' marginwidth="0" marginheight="0" frameborder="0" width="970" height="186" scrolling="No" height="0" charset="utf-8"></iframe>');$("#wmzcdiv").html('<iframe name="wmzc" src="http://www.wenming.cn/syzhq/tjq/xhwwmzc/index.shtml" width="230" height="152" scrolling="No" frameborder="NO" id="wmzc" charset="utf-8"></iframe>');$("#HHpBn01_01div").html('<iframe id="HHpBn01_01" src="http://embed.xinhuanet.com/main/s?user=AllyesNetwork|Hp|HHpBn01_01&db=xinhuanet&border=0&local=yes" marginheight="0" marginwidth="0" frameborder="0" width="165" height="60" scrolling="no"></iframe>');$("#HHpBn01_02div").html('<iframe id="HHpBn01_02" src="http://embed.xinhuanet.com/main/s?user=AllyesNetwork|Hp|HHpBn01_02&db=xinhuanet&border=0&local=yes" marginheight="0" marginwidth="0" frameborder="0" width="625" height="60" scrolling="no"></iframe>');$("#HHpBn01_03div").html('<iframe id="HHpBn01_03" src="http://embed.xinhuanet.com/main/s?user=AllyesNetwork|Hp|HHpBn01_03&db=xinhuanet&border=0&local=yes" marginheight="0" marginwidth="0" frameborder="0" width="165" height="60" scrolling="no"></iframe>');$("#HHpBn02_01div").html('<iframe id="HHpBn02_01" src="http://embed.xinhuanet.com/main/s?user=AllyesNetwork|Hp|HHpBn02_01&db=xinhuanet&border=0&local=yes" marginheight="0" marginwidth="0" frameborder="0" width="760" height="80" scrolling="no"></iframe>');$("#HHpBn02_02div").html('<iframe id="HHpBn02_02" src="http://embed.xinhuanet.com/main/s?user=AllyesNetwork|Hp|HHpBn02_02&db=xinhuanet&border=0&local=yes" marginheight="0" marginwidth="0" frameborder="0" width="200" height="80" scrolling="no"></iframe>');$("#HHpBn03_01div").html('<iframe id="HHpBn03_01" src="http://embed.xinhuanet.com/main/s?user=AllyesNetwork|Hp|HHpBn03_01&db=xinhuanet&border=0&local=yes" marginheight="0" marginwidth="0" frameborder="0" width="960" height="80" scrolling="no"></iframe>');$("#HHpLf01_01div").html('<iframe id="HHpLf01_01" src="http://embed.xinhuanet.com/main/s?user=AllyesNetwork|Hp|HHpLf01_01&db=xinhuanet&border=0&local=yes" marginheight="0" marginwidth="0" frameborder="0" width="610" height="50" scrolling="no"></iframe>');$("#HHpLf02_01div").html('<iframe id="HHpLf02_01" src="http://embed.xinhuanet.com/main/s?user=AllyesNetwork|Hp|HHpLf02_01&db=xinhuanet&border=0&local=yes" marginheight="0" marginwidth="0" frameborder="0" width="300" height="180" scrolling="no"></iframe>');$("#HHpMd01_01div").html('<iframe id="HHpMd01_01" src="http://embed.xinhuanet.com/main/s?user=AllyesNetwork|Hp|HHpMd01_01&db=xinhuanet&border=0&local=yes" marginheight="0" marginwidth="0" frameborder="0" width="165" height="70" scrolling="no"></iframe>');$("#HHpMd01_02div").html('<iframe id="HHpMd01_02" src="http://embed.xinhuanet.com/main/s?user=AllyesNetwork|Hp|HHpMd01_02&db=xinhuanet&border=0&local=yes" marginheight="0" marginwidth="0" frameborder="0" width="165" height="70" scrolling="no"></iframe>')});

//页面需要滑动门位置

//滑动门按钮Title

<div class="tagn" id="tagname_jrjd1" onmouseover="SwitchNewsTag('jrjd',1,2)"> <a href="http://www.xinhuanet.com/finance/" target="_blank">金 融 »</a> </div>
<div class="tagf" id="tagname_jrjd2" onmouseover="SwitchNewsTag('jrjd',2,2)"> <a href="http://www.xinhuanet.com/jiadian" target="_blank">家 电 »</a></div>

其中 class="tagn"和 class="tagf"控制滑动效果

//滑动门内容

<!--金融-->
<div class="sqleft" id="jrjd1" style="display: none;">  【内容】</div>

<!--家电-->

<div class="sqleft" id="jrjd2" style="">  【内容】</div>


其中 style=":display:none"控制显示区域块


版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章推荐

一款经典简洁的CSS滑动门代码

一款经典简洁的CSS滑动门代码,来自经典论坛,很多网站都见到过这种,代码并不多,非常实用。响应鼠标滑过而不是点击鼠标才切换,适你的需要了,滑动门的灵魂所在。

经典css滑动门效果导航

css滑动门技术

双重滑动门效果还是比较常用的,其实很好理解: 两个门就好比两个块级的元素重合所形成的效果,看一段代码如下: #Mydoor ul li a:hover{ color:#fff; ...

CSS的滑动门技术.pdf

  • 2011-02-12 11:23
  • 478KB
  • 下载

HTML5滑动门动画(侧滑,上滑)

HTML5的动画是通过伪类@实现的,设置动画的起始位置,结束位置,动画时间即可,中间的过度HTML会自动补齐,简单的代码就可以实现炫酷动画效果。 实例: 动画 ...

Js简易滑动门效果和css标题菜单栏效果

Js简易滑动门效果 Css部分 .www_zzjs_net_show{display:none;width:472px;height:200px;border:1pxsolid #CCCCCC;m...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)