移动字幕设置

作者:国胜强
日期:2010/12/22 23:12:25

打开模版网页的HTML源文件,把<body>和</body>之间加入:
<marquee>移动字幕的实例</marquee>
<marquee direction=”left”>从左向右移动字幕的实例</marquee>
<marquee direction=”right”>从右向左移动字幕的实例</marquee>
<marquee behavior=”slide”>一次性移动字幕的实例</marquee>
<marquee behavior=”scroll”>循环移动字幕的实例</marquee>
<marquee behavior=”alternate”>来回循环移动字幕的实例</marquee>
<marquee scrollamount=”10”>快速移动字幕的实例</marquee>
<marquee hspace=”20” vspace=”20” height=”50” width=”50%” bgcolor=”red” align=”top”>红色背景移动字幕的实例</marquee>
保存退出。现在来解释一下代码的含义:
marquee是HTML的标识之一,用于实现文字的移动效果。IE4。0以上的浏览器才能正常显示。
Direction设置文字移动的方向。取值为left(从左向右移动)或right(从右向左移动)。
Behavior设置文字移动的方式。取值为slide(一次性移动)、scroll(循环移动)和alternate(来回循环移动)。

分享