| |
|
|
精彩JS实例:擦除式特效字幕
阿伦·yesky
我们看多了网上单调的滚动字幕是否感觉枯燥无味呢?!那今天我们自己动手用JS来设计个漂亮点的字幕──带连接的擦除式字幕(见下面的演示效果),而且所有字幕信息在一行上按先后顺序显示出来,我们来学习一下吧!
首先编辑以下调用代码,把它加到<head></head>之间即可。
<SCRIPT>
<!--
function correct(){
if (finished){
setTimeout("begin()",0)
}
return true
}
window.onerror=correct
function begin(){
if (!document.all)
return
if (maxheight==null)
maxheight=temp.offsetHeight
whatsnew.style.height=maxheight
temp.style.display="none"
c=1
finished=true
change()
}
//-->
</SCRIPT> |
|