zl程序教程

您现在的位置是:首页 >  系统

当前栏目

网站上面有这种切换效果

网站 效果 切换 这种 上面
2023-06-13 09:13:41 时间

<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<htmlxmlns="http://www.w3.org/1999/xhtml">
<head>
<metahttp-equiv="Content-Type"content="text/html;charset=gb2312"/>
<title>新闻切换技术</title>
<styletype="text/css">
<!--
body{text-align:center;margin:0;padding:0;background:#FFF;font-size:12px;color:#000;}
div,form,img,ul,ol,li,dl,dt,dd{margin:0;padding:0;border:0;}
h1,h2,h3,h4,h5,h6{margin:0;padding:0;}
table,td,tr,th{font-size:12px;}
a:link{color:#000;text-decoration:none;}
a:visited{color:#83006f;text-decoration:none;}
a:hover{color:#c00;text-decoration:underline;}
a:active{color:#000;}
.focusPic{margin:0auto;width:244px;}
.focusPic.pic{margin:0auto;width:240px;height:180px;padding:2px00;}
.focusPic.adPic{margin:0auto5px;width:240px;height:29px;overflow:hidden;background:url(http://tech.163.com/newimg/adpic.gif);}
.focusPic.adPic.text{float:right;padding:9px4px00;width:140px;}
.focusPic.adPic.texta{color:#1f3a87;}
.focusPic.adPic.texta:hover{color:#bc2931;}
.focusPich2{float:left;width:232px;padding:4px03px12px;font-size:14px;text-align:left;}
.focusPicp{float:left;width:226px;line-height:160%;margin:0;text-align:left;padding:0010px12px;}
.focusPicpimg{margin:0px02px;}
.focusPic.more{margin:0auto;width:240px;}
.focusPic.more.textNum{float:right;margin:08px00;padding:004px;}
.focusPic.more.textNum.text{float:left;font-weight:bold;padding:7px6px00;color:#666;}
.focusPic.more.textNum.num{float:left;width:113px;height:19px;}
.focusPic.more.textNum.bg1{background:url(http://tech.163.com/newimg/num1.gif);}
.focusPic.more.textNum.bg2{background:url(http://tech.163.com/newimg/num2.gif);}
.focusPic.more.textNum.bg3{background:url(http://tech.163.com/newimg/num3.gif);}
.focusPic.more.textNum.bg4{background:url(http://tech.163.com/newimg/num4.gif);}
.focusPic.more.textNum.numul{float:left;width:113px;}
.focusPic.more.textNum.numli{float:left;width:28px;font-weight:bold;display:block;color:#fff;list-style-type:none;padding:6px00;}
.focusPic.more.textNum.numlia{color:#fff;padding:05px;}
.focusPic.more.textNum.numlia:visited{color:#fff;}
.focusPic.more.textNum.numlia:hover{color:#ff0;}

-->
</style>
</head>

<body>
 <scriptlanguage="JavaScript"type="text/javascript">
varnn;
nn=1;
setTimeout("change_img()",6000);
functionchange_img()
{
 if(nn>4)nn=1
 setTimeout("setFocus1("+nn+")",6000);
 nn++;
 tt=setTimeout("change_img()",6000);
}
functionsetFocus1(i)
{
 selectLayer1(i);
}
functionselectLayer1(i)
{
 switch(i)
 {
 case1:
 document.getElementById("focusPic1").style.display="block";
 document.getElementById("focusPic2").style.display="none";
 document.getElementById("focusPic3").style.display="none";
 document.getElementById("focusPic4").style.display="none";
 document.getElementById("focusPic1nav").style.display="block";
 document.getElementById("focusPic2nav").style.display="none";
 document.getElementById("focusPic3nav").style.display="none";
 document.getElementById("focusPic4nav").style.display="none";
 break;
 case2:
 document.getElementById("focusPic1").style.display="none";
 document.getElementById("focusPic2").style.display="block";
 document.getElementById("focusPic3").style.display="none";
 document.getElementById("focusPic4").style.display="none";
 document.getElementById("focusPic1nav").style.display="none";
 document.getElementById("focusPic2nav").style.display="block";
 document.getElementById("focusPic3nav").style.display="none";
 document.getElementById("focusPic4nav").style.display="none";
 break;
 case3:
 document.getElementById("focusPic1").style.display="none";
 document.getElementById("focusPic2").style.display="none";
 document.getElementById("focusPic3").style.display="block";
 document.getElementById("focusPic4").style.display="none";
 document.getElementById("focusPic1nav").style.display="none";
 document.getElementById("focusPic2nav").style.display="none";
 document.getElementById("focusPic3nav").style.display="block";
 document.getElementById("focusPic4nav").style.display="none";
 break;
 case4:
 document.getElementById("focusPic1").style.display="none";
 document.getElementById("focusPic2").style.display="none";
 document.getElementById("focusPic3").style.display="none";
 document.getElementById("focusPic4").style.display="block";
 document.getElementById("focusPic1nav").style.display="none";
 document.getElementById("focusPic2nav").style.display="none";
 document.getElementById("focusPic3nav").style.display="none";
 document.getElementById("focusPic4nav").style.display="block";
 break;
 }
}
</script>
 <divclass="focusPic">
 <divid="focusPic1"style="display:block;">
 <divclass="pic"><ahref="http://tech.163.com/special/000915SN/soft2005.html"><imgsrc="http://cimg.163.com/tech/2006/1/18/2006011810122068706.jpg"alt="网易学院05年软件评选结果"width="240"height="180"border="0"/></a></div>
 <h2><ahref="http://tech.163.com/special/000915SN/soft2005.html">网易学院05年软件评选结果</a></h2>
 <p>经过大家的热情投票和我们的辛劳整理,网易学院2005年年度软件评选结果终于出炉啦。点击进入查看……<imgsrc="/newimg/i2.gif"alt="详细"width="3"height="5"/><ahref="http://tech.163.com/special/000915SN/soft2005.html"class="cDRed">详细</a></p>
 </div>
 <divid="focusPic2"style="display:none;">
 <divclass="pic"><ahref="http://tech.163.com/discover/"><imgsrc="http://cimg.163.com/tech/2006/1/17/200601171557008cee7.jpg"alt="颠覆丛林动物生存法则"width="240"height="180"border="0"/></a></div>
 <h2><ahref="http://tech.163.com/discover/">颠覆丛林动物生存法则</a></h2>
 <p>群居动物的这种行为颠覆了我们通常认为的,在动物世界通行的“丛林法则”,动物不都自私,不都是弱肉强食的。<imgsrc="/newimg/i2.gif"alt="详细"width="3"height="5"/><ahref="http://tech.163.com/discover/"class="cDRed">详细</a></p>
 </div>
 <divid="focusPic3"style="display:none;">
 <divclass="pic"><ahref="http://tech.163.com/special/00091MNJ/itobserve015.html"><imgsrc="http://cimg.163.com/tech/2006/1/17/2006011711483290a60.jpg"alt="WAPI并非贸易阴谋"width="240"height="180"border="0"/></a></div>
 <h2><ahref="http://tech.163.com/special/00091MNJ/itobserve015.html">WAPI并非贸易阴谋</a></h2>
 <p>近日国家做出决定:“将向其他的国内及国外企业公布该算法”。事实证明中国WAPI标准并非是贸易阴谋。<imgsrc="/newimg/i2.gif"alt="详细"width="3"height="5"/><ahref="http://tech.163.com/special/00091MNJ/itobserve015.html"class="cDRed">详细</a></p>
 </div>
 <divid="focusPic4"style="display:none;">
 <divclass="pic"><ahref="http://tech.163.com/special/00091OSI/horizons.html"><imgsrc="http://cimg.163.com/tech/2006/1/17/200601171002503f251.jpg"alt="新视野号探测冥王星特别专题"width="240"height="180"border="0"/></a></div>
 <h2><ahref="http://tech.163.com/special/00091OSI/horizons.html">新视野号探测冥王星特别专题</a></h2>
 <p>美国宇航局将于北京时间18日凌晨2时24分发射新视野号探测器,造访这颗人类唯一尚未探测过的行星-冥王星。<imgsrc="/newimg/i2.gif"alt="详细"width="3"height="5"/><ahref="http://tech.163.com/special/00091OSI/horizons.html"class="cDRed">详细</a></p>
 </div>
 <divclass="more">
 <divclass="textNum">
 <divclass="text">>更多头图新闻</div>
 <divclass="numbg1"id="focusPic1nav"style="display:block;">
 <ul>
 <li>1</li>
 <li><ahref="javascript:setFocus1(2);"target="_self">2</a></li>
 <li><ahref="javascript:setFocus1(3);"target="_self">3</a></li>
 <li><ahref="javascript:setFocus1(4);"target="_self">4</a></li>
 </ul>
 </div>
 <divclass="numbg2"id="focusPic2nav"style="display:none;">
 <ul>
 <li><ahref="javascript:setFocus1(1);"target="_self">1</a></li>
 <li>2</li>
 <li><ahref="javascript:setFocus1(3);"target="_self">3</a></li>
 <li><ahref="javascript:setFocus1(4);"target="_self">4</a></li>
 </ul>
 </div>
 <divclass="numbg3"id="focusPic3nav"style="display:none;">
 <ul>
 <li><ahref="javascript:setFocus1(1);"target="_self">1</a></li>
 <li><ahref="javascript:setFocus1(2);"target="_self">2</a></li>
 <li>3</li>
 <li><ahref="javascript:setFocus1(4);"target="_self">4</a></li>
 </ul>
 </div>
 <divclass="numbg4"id="focusPic4nav"style="display:none;">
 <ul>
 <li><ahref="javascript:setFocus1(1);"target="_self">1</a></li>
 <li><ahref="javascript:setFocus1(2);"target="_self">2</a></li>
 <li><ahref="javascript:setFocus1(3);"target="_self">3</a></li>
 <li>4</li>
 </ul>
 </div>
 </div>
 </div>
 </div>
</body>
</html>