小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

圖片滾動(dòng)代碼8

 冰鋒一笑 2011-03-19
幾個(gè)上下左右滾動(dòng)圖片代碼
幾個(gè)上下左右滾動(dòng)圖片代碼JS圖片左右無(wú)縫隙滾動(dòng)(兼容IE,Firefox 遵循W3C標(biāo)準(zhǔn))

滾動(dòng)圖片代碼JS圖片左右無(wú)縫<!--下面是向上滾動(dòng)代碼-->

<div id=fx_gun_top style=overflow:hidden;height:100;width:90;>
<div id=fx_gun_top1>
<img src="http:///images/logo.gif">
<img src="http:///images/logo.gif">
<img src="http:///images/logo.gif">
<img src="http:///images/logo.gif">
<img src="http:///images/logo.gif">
<img src="http:///images/logo.gif">
<img src="http:///images/logo.gif">
<img src="http:///images/logo.gif">
<img src="http:///images/logo.gif">
</div>
<div id=fx_gun_top2></div>
</div>
<script>
var speed=30
fx_gun_top2.innerHTML=fx_gun_top1.innerHTML //克隆fx_gun_top1為fx_gun_top2
function Marquee1(){
//當(dāng)滾動(dòng)至fx_gun_top1與fx_gun_top2交界時(shí)
if(fx_gun_top2.offsetTop-fx_gun_top.scrollTop<=0)  
fx_gun_top.scrollTop-=fx_gun_top1.offsetHeight //fx_gun_top跳到最頂端
else{
fx_gun_top.scrollTop++;
}
}
var MyMar1=setInterval(Marquee1,speed)//設(shè)置定時(shí)器
//鼠標(biāo)移上時(shí)清除定時(shí)器達(dá)到滾動(dòng)停止的目的
fx_gun_top.onmouseover=function() {clearInterval(MyMar1)}
//鼠標(biāo)移開(kāi)時(shí)重設(shè)定時(shí)器
fx_gun_top.onmouseout=function(){MyMar1=setInterval(Marquee1,speed)}
</script>

<!--向上滾動(dòng)代碼結(jié)束-->

<br>

<!--下面是向下滾動(dòng)代碼-->

<div id=fx_gun_bottom style=overflow:hidden;height:100;width:90;>
<div id=fx_gun_bottom1>
<img src="http:///images/logo.gif">
<img src="http:///images/logo.gif">
<img src="http:///images/logo.gif">
<img src="http:///images/logo.gif">
<img src="http:///images/logo.gif">
<img src="http:///images/logo.gif">
<img src="http:///images/logo.gif">
<img src="http:///images/logo.gif">
<img src="http:///images/logo.gif">
</div>
<div id=fx_gun_bottom2></div>
</div>
<script>
var speed=30
fx_gun_bottom2.innerHTML=fx_gun_bottom1.innerHTML
fx_gun_bottom.scrollTop=fx_gun_bottom.scrollHeight
function Marquee2(){
if(fx_gun_bottom1.offsetTop-fx_gun_bottom.scrollTop>=0)
fx_gun_bottom.scrollTop+=fx_gun_bottom2.offsetHeight
else{
fx_gun_bottom.scrollTop--
}
}
var MyMar2=setInterval(Marquee2,speed)
fx_gun_bottom.onmouseover=function() {clearInterval(MyMar2)}
fx_gun_bottom.onmouseout=function() {MyMar2=setInterval(Marquee2,speed)}
</script>

<!--向下滾動(dòng)代碼結(jié)束-->

<br>

<!--下面是向左滾動(dòng)代碼-->

<div id="fx_gun_left" style="overflow:hidden;width:500px;">
<table cellpadding="0" cellspacing="0" border="0">
<tr><td id="fx_gun_left1" valign="top" align="center">
<table cellpadding="2" cellspacing="0" border="0">
<tr align="center">
<td><img src="http:///images/logo.gif"></td>
<td><img src="http:///images/logo.gif"></td>
<td><img src="http:///images/logo.gif"></td>
<td><img src="http:///images/logo.gif"></td>
<td><img src="http:///images/logo.gif"></td><td><img src="http:///images/logo.gif" width="88"></td>
<td><img src="http:///images/logo.gif"></td>
</tr>
</table>
</td>
<td id="fx_gun_left2" valign="top"></td>
</tr>
</table>
</div>
<script>
var speed=30//速度數(shù)值越大速度越慢
fx_gun_left2.innerHTML=fx_gun_left1.innerHTML
function Marquee3(){
if(fx_gun_left2.offsetWidth-fx_gun_left.scrollLeft<=0)
fx_gun_left.scrollLeft-=fx_gun_left1.offsetWidth
else{
fx_gun_left.scrollLeft++
}
}
var MyMar3=setInterval(Marquee3,speed)
fx_gun_left.onmouseover=function() {clearInterval(MyMar3)}
fx_gun_left.onmouseout=function() {MyMar3=setInterval(Marquee3,speed)}
</script>

<!--向左滾動(dòng)代碼結(jié)束-->

<br>

<!--下面是向右滾動(dòng)代碼-->

<div id="fx_gun_right" style="overflow:hidden;width:500px;">
<table cellpadding="0" cellspacing="0" border="0">
<tr><td id="fx_gun_right1" valign="top" align="center">
<table cellpadding="2" cellspacing="0" border="0">
<tr align="center">
<td><img src="http:///images/logo.gif"></td>
<td><img src="http:///images/logo.gif"></td>
<td><img src="http:///images/logo.gif"></td>
<td><img src="http:///images/logo.gif"></td>
<td><img src="http:///images/logo.gif"></td>
</tr>
</table>
</td>
<td id="fx_gun_right2" valign="top"></td>
</tr>
</table>
</div>
<script>
var speed=30//速度數(shù)值越大速度越慢
fx_gun_right2.innerHTML=fx_gun_right1.innerHTML
function Marquee4(){
if(fx_gun_right.scrollLeft<=0)
fx_gun_right.scrollLeft+=fx_gun_right2.offsetWidth
else{
fx_gun_right.scrollLeft--
}
}
var MyMar4=setInterval(Marquee4,speed)
fx_gun_right.onmouseover=function() {clearInterval(MyMar4)}
fx_gun_right.onmouseout=function() {MyMar4=setInterval(Marquee4,speed)}
</script>

<!--向右滾動(dòng)代碼結(jié)束-->

    本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購(gòu)買(mǎi)等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請(qǐng)遵守用戶 評(píng)論公約

    類(lèi)似文章 更多