您的位置:PHPUU > XHTML教程 > XHTML代码 > 文章内容

Marquee妙用代码 - 实现屏保效果

时间:2008-09-30   浏览次数 57

斜着移到效果


<marquee height="400" direction="up" width="500" bgcolor="#3366cc">
<marquee height="50" direction="left" width="100%">
<font style="font-size: 35px; color:#fff">MARQUEE</font>
</marquee>
</marquee>

屏幕保护效果 (到了边缘弹回的效果)

再来个参数behavior="alternate"

scroll:Marquee 根据 direction 设置的方向滚动,文本滚到头以后再重头开始,这是默认值。.
alternate:Marquee 的内容到达容器的边缘后又按照相反的方向滚动回来,周而复始,形成周期
slid:Marquee 根据 direction 设置的方向滚动,到边缘就停止滚动,不再重复


<table>
<tr>
<td bgcolor=#cc3300 width=468>
<marquee direction="down" behavior="alternate" scrollamount=1 height="60">
  <marquee direction="right" behavior="alternate" scrollamount=4  width="468">
        我被墙撞回@_@!
    </marquee>
</marquee>
</td>
</tr>
</table>

XHTML教程分类