首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

小弟我这段文字滚动效果始终做不出啊试了很多方式都没用,各位大侠了

2012-03-19 
我这段文字滚动效果始终做不出啊,试了很多方式都没用,求助各位大侠了,在线等!DOCTYPE htmlhtmlhead

我这段文字滚动效果始终做不出啊,试了很多方式都没用,求助各位大侠了,在线等
<!DOCTYPE html>
<html>
  <head>
  <title>Welcome To Long's Resume</title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <link href="InsideStyle.css" rel="stylesheet" />
  <link rel="stylesheet" href="960.css"/>
  <link rel="stylesheet" href="reset.css"/>
  </head>
  <body>
  <div class="container_12">
  <header>
  <div class="grid_12">  
  <img src="banner.gif" class="ado"/>
  </div>
  </header>

  <div class="grid_3">
  <img src="logo2.png" class="ad"/>
  <aside id="time">  
  <span id=localtime></span>
  <script type="text/javascript">
  function showLocale(objD)
  {
  var str,colorhead,colorfoot;
  var yy = objD.getYear();
  if(yy<1900) yy = yy+1900;
  var MM = objD.getMonth()+1;
  if(MM<10) MM = '0' + MM;
  var dd = objD.getDate();
  if(dd<10) dd = '0' + dd;
  var hh = objD.getHours();
  if(hh<10) hh = '0' + hh;
  var mm = objD.getMinutes();
  if(mm<10) mm = '0' + mm;
  var ss = objD.getSeconds();
  if(ss<10) ss = '0' + ss;
  var ww = objD.getDay();
  if ( ww==0 ) colorhead="<font color=\"#FF0000\">";
  if ( ww > 0 && ww < 6 ) colorhead="<font color=\"#373737\">";
  if ( ww==6 ) colorhead="<font color=\"#008000\">";
  if (ww==0) ww="Sun";
  if (ww==1) ww="Mon";
  if (ww==2) ww="Tue";
  if (ww==3) ww="Wed";
  if (ww==4) ww="Thu";
  if (ww==5) ww="Fri";
  if (ww==6) ww="Sat";
  colorfoot="</font>"
  str = colorhead + yy + "-" + MM + "-" + dd + " " + hh + ":" + mm + ":" + ss + " " + ww + colorfoot;
  return(str);
  }
  function tick()
  {
  var today;
  today = new Date();
  document.getElementById("localtime").innerHTML = showLocale(today);
  window.setTimeout("tick()", 1000);
  }
  tick();
  </script>


  </aside>
  </div>
  <div class="grid_9">
  <nav id="mainnav">
  <ul>
  <li><a href="#">Summary</a></li>
  <li><a href="#">Tech Skills</a></li>
  <li><a href="#">Certification</a></li>
  <li><a href="#">Professional Experience</a></li>
  <li><a href="#">Education</a></li>
  </ul>
  </nav>  
  </div>
  <div class="clear"></div>
  <div class="grid_3" id="photoandsum">
  <img src="53.png" class="photo"/>
  <div id=demo style=overflow:hidden;height:60px>
<div id="demo1">
  <p> SUMMARY OF QUALIFICATIONS</p>
  <p>·Half year experience designing, developing, integrating and supporting corporate tools and applications.</p>
  <p>·Apply in-depth understanding of business and IT requirements to streamline administration and internal processes, resulting in enhanced automation and operational efficiency.</p>
  <p>·Manage multiple projects simultaneously. Learn and apply new technologies quickly.</p>
  <p>·Expert knowledge of numerous programming languages, including Visual Basic, Html, and C</p>
  <p>·Superior communication, presentation, analytical, and problem-solving skills.</p>
  </div>
  <div id="demo2"></div>
  <script>
var t=demo.scrollTop
demo2.innerText=demo1.innerText
function qswhMarquee(){
if(demo2.offsetTop-demo.scrollTop<=0)

demo.scrollTop-=demo1.offsetHeight
else
demo.scrollTop++
}
setInterval(qswhMarquee,10)
</script></div>
  </div>
 </div>
  </body>
</html>

[解决办法]
可以滚动啊。。不过滚几次就不滚了。。。

热点排行