<div class="codetitle"> <span><a style="CURSOR: pointer" data="32761" class="copybut" id="copybut32761" onclick="doCopy('code32761')"><u>复制代</u></a></span> 代码如下:</div> <div class="codebody" id="code32761"> <br><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 移行//EN" "http://www.w3.org/TR/html4/loose.dtd"><br><html><br> <head><br> <title>新しいドキュメント </title><br> <style type="text/css"><br> *{margin:0;padding:0;}<br> ul{list-style:noneOutside none}<br> .slchanpin001{幅:200px;ボーダー:1px オレンジ色一色;マージン:55px 自動}<br> .slchanpin001-t{高さ:25px;背景:オレンジ}<br> .slchanpin001-c{幅:200px;高さ: 60px;overflow:hidden;position:relative}<br> .slchanpin001-c li{float:left;width:200px;height:60px;background:red;}<br> .slchanpingCon01{height:60px;position:absolute; top:0;left:0;}<br> </style><br> </head><br> <body><br> <div class="slchanpin001"><br> < div class="slchanpin001-t"></div><br> <div class="slchanpin001-c"><br> <div class="slchanpingCon01" id="slchanpingCon01"><BR> <ul><br> <li>1</li><br> <li>2</li><br> <li>3</li><br> <li&g t;4<; /li><br> <li>5</li><br> <li>6</li><br> <li>7</li><br> <li>8</li& GT ;<br> <li>9</li><br> <li>10</li><br> <li>10</li><br> <li>10</li&g t;<BR> </ul><br> </div><br> </div><br> </div><br><br> <br> <script type="text/javascript" ><br> var sl = function(id){ return document.getElementById(id)}<br> var Speed = 0;<br> var timer = null;<br> var i=0;<br> function slProdust (){<slchanpingcon01 sl> var slelem = sl( "slchanpingcon01");<br>var sldivwidth = slchanpingcon01 [0] .Offsetwidth * slchanpingcon01 .length;<br> slElem.style.width = slDivWidth "px";<br> function autoFunc(){<br> if(speed > -slDivWidth ){<br> speed--;<br><br> slElem.style.left = 速度 "px"<br> }<br> else{<br><br> clearTimeout(タイマー);<br> }<br> timer = setTimeout(function(){autoFunc()},10);<br> }<br> autoFunc();<br> }<br> slProdust();<br> </script> <br> </body><br></html><br><br></slchanpingcon01> </div>