分享

图片移动代码集锦

 奔月的人 2010-01-01
a)scrollAmount。它表示速度,值越大速度越快。如果没有它,默认为6,建议设为1~3比较好。

b)width和height,表示滚动区域的大小,width是宽度,height是高度。特别是在做垂直滚动的时候,一定要设height的值。

c)direction。表示滚动的方向,默认为从右向左:←←←。可选的值有right、down、up。滚动方向分别为:right表示→→→,up表示↑,down表示↓。

d)scrollDelay,这也是用来控制速度的,默认为90,值越大,速度越慢。通常scrollDelay是不需要设置的。
e)behavior。用它来控制属性,默认为循环滚动,可选的值有alternate(交替滚动)、slide(幻灯片效果,指的是滚动一次,然后停止滚动)


一、向左移动
<marquee><img src=http://img.blog.163.com/photo/DhqltUpWrDXmg89CjFLZdg==/486107284779580348.jpg><br>从右向左移动</marquee>



二、向右移动
<marquee direction=right><img src=http://img.blog.163.com/photo/DhqltUpWrDXmg89CjFLZdg==/486107284779580348.jpg width=90 height=30><br><font color=0000ff size=3 face=宋体><b>从左向右移动</b></font></marquee>



三、向上移动
<marquee direction=up onmouseover=this.stop() scrollamount=5 onmouseout=this.start()><center><img src=http://img.blog.163.com/photo/DhqltUpWrDXmg89CjFLZdg==/486107284779580348.jpg width=90 height=30></center></marquee>



四、向下移动
<marquee direction=down scrollamount=5><center><font color=0000ff size=5 face=华文行楷><b>向下移动</b></font><br><img src=http://img.blog.163.com/photo/DhqltUpWrDXmg89CjFLZdg==/486107284779580348.jpg width=90 height=30></marquee>



五、来回移动
<marquee width=100% behavior=alternate scrollamount=10><img src=http://img.blog.163.com/photo/DhqltUpWrDXmg89CjFLZdg==/486107284779580348.jpg width=90 height=30><br><font color=0000ff size=5 face=华文行楷><b>来回移动</b></font></marquee>



六、上下起伏
<marquee direction=left><marquee behavior=alternate direction=up height=100><img src=http://img.blog.163.com/photo/DhqltUpWrDXmg89CjFLZdg==/486107284779580348.jpg><img src=http://img.blog.163.com/photo/DhqltUpWrDXmg89CjFLZdg==/486107284779580348.jpg><font color=0000ff size=3 face=华文行楷></b></font></marquee></marquee>



七、中间向两边移动:
<center><br><marquee width=220 height=50><img src=http://img.blog.163.com/photo/DhqltUpWrDXmg89CjFLZdg==/486107284779580348.jpg width=90 height=30><font face=华文彩云 color=#0000ff size=5><br>中间向两边移动</font></marquee><marquee direction=right width=220 height=50><img src=http://img.blog.163.com/photo/DhqltUpWrDXmg89CjFLZdg==/486107284779580348.jpg width=90 height=30><font face=华文彩云 color=#0000ff size=5><br>中间向两边移动<br></marquee></font></center>


八、中间相对上下移动:
<marquee direction=up onmouseover=this.stop() scrollamount=3 onmouseout=this.start><center><img src=http://myok.blogchina.com/inc/myoklogo.gif width=90></marquee></center><marquee direction=down scrollamount=3><center><div style="width:400;filter:flipv;"><img src="http://myok.blogchina.com/inc/myoklogo.gif" width=90></div></center></marquee>

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多