html中上下滚动的文字代码,举例?

html-css014

html中上下滚动的文字代码,举例?,第1张

在要实现滚动的地方,加入此代码:

<marquee direction=up>要输入的文字</marquee>

UP是向上, DOWN是向下,Left向左,Right向右.

这两个属性决定文字滚动的速度(scrollamount)和延时(scrolldelay),参数值都是正整数。如下所示:

<marquee scrollamount="100">我速度很快。</marquee>

<marquee scrollamount="50">我慢了些。</marquee>

<marquee scrolldelay="30">我小步前进。</marquee>

<marquee scrolldelay="1000" scrollamount="100">我大步前进。</marquee>

按照自己的需要写代码吧,希望能够帮助你!

如果是想用html实现滚动效果的话可以使用HTML标签marquee  如图也可下载附件

代码:

<marquee direction="up" behavior="scroll" scrollamount="1" scrolldelay="0" loop="-1" width="1000" height="70" bgcolor="#ccc" hspace="10" vspace="10">

指整个Marquee对齐方式 (2)behavior:设置滚动的方式: scroll:表示由一端滚动到另一端,会重复,缺陷是不能无缝滚动。 slide:表示由一段滚动到另一端,不会重复...

</marquee>