
1.在index.html文件里面
2.在JS文件夹里面的js文件里面
3.这些文字是写在图片上
建议把主页index.html文件放到DW上,进行排查,修改。
<DIV id=marquees><A href="javascript:">1,你可曾有过无数的梦想,</A><BR><BR><Ahref="javascript:">2,却在时光的流逝里幻灭 </A><BR><BR><A
href="javascript:">3,你可曾对未来期待憧憬,</A><BR><BR><A
href="javascript:">4,却在成长的岁月中迷失</A><BR><BR></DIV>
<SCRIPT language=JavaScript>
marqueesHeight=200
stopscroll=false
with(marquees){
style.width=0
style.height=marqueesHeight
style.overflowX="visible"
style.overflowY="hidden"
noWrap=true
onmouseover=new Function("stopscroll=true")
onmouseout=new Function("stopscroll=false")
}
document.write('<div id="templayer" style="position:absolutez-index:1visibility:hidden"></div>')
preTop=0currentTop=0
function init(){
templayer.innerHTML=""
while(templayer.offsetHeight<marqueesHeight){
templayer.innerHTML+=marquees.innerHTML
}
marquees.innerHTML=templayer.innerHTML+templayer.innerHTML
setInterval("scrollUp()",20)//越大越慢
}
document.body.onload=init
function scrollUp(){
if(stopscroll==true) return
preTop=marquees.scrollTop
marquees.scrollTop+=1
if(preTop==marquees.scrollTop){
marquees.scrollTop=templayer.offsetHeight-marqueesHeight
marquees.scrollTop+=1
}
}
</SCRIPT>这个是文字向上滚动。
<marquee direction="up" behavior="alternate">你好,希望这个是你所需要的效果!!!</marquee>这个是文字上下来回滚动!
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)