Use marquee tags to set text to the effect of dynamic scrolling, syntax: <marquee direction= "scroll direction" behavior= "scrolling Way" > scrolling text </marquee>
1 <!DOCTYPE HTML>2 <HTML>3 <Head>4 <MetaCharSet= "Utf-8">5 <title>Multimedia pages</title>6 </Head>7 <Body>8 <Marqueedirection= "Left"Behavior= "Slide">9 A great event for the ancient peopleTen </Marquee> One <Marqueedirection= "Right"Behavior= "Scroll"><FontColor= "#FF3366"size= "+2"> AInflexible has the Super world</Font> - </Marquee> - <MarqueeBehavior= "alternate"><FontColor= "#0099CC"size= "+3"> theThere is also the ambition of perseverance</Font> - </Marquee> - </Body> - </HTML>
The ScrollAmount property enables you to adjust the speed of text scrolling, and the Scrolldelay property sets the time interval for scrolling text.
1 <!DOCTYPE HTML>2 <HTML>3 <Head>4 <MetaCharSet= "Utf-8">5 <title>Multimedia pages</title>6 </Head>7 <Body>8 <MarqueeScrollAmount= "+"Scrolldelay= "Ten">9 <Fontsize= "+2"Color= "#CC3366">Look, I keep walking.</Font>Ten </Marquee> One <MarqueeScrollAmount= "+"Scrolldelay= "+"> A <Fontsize= "+2"Color= "#6633CC">Look, I'm going to stop.</Font> - </Marquee> - <MarqueeScrollAmount= "+"Scrolldelay= "$"> the <Fontsize= "+2"Color= "#99FF00">I'm going to take one step, stop.</Font> - </Marquee> - </Body> - </HTML>
After you set the scrolling text, the default will continue to loop, if you want the text to scroll a few times to stop, you can use the Loop property to set <marquee loop= "cycle count" > scrolling text </marquee>
<!DOCTYPE HTML><HTML><Head><MetaCharSet= "Utf-8"><title>Multimedia pages</title></Head><Body><Marqueedirection= "Up"Loop= "Ten"><Fontsize= "+5"Color= "#CC0000" Face= "Official script">A gentleman's turn is as weak as water<BR>villain's turn indifferent<BR></Font></Marquee></Body></HTML>
If you do not set the area of the scrolling background, by default, the horizontal scrolling text background is the same height as the text, with the width of the browser window, and the width and Height properties can be used to adjust its horizontal and vertical range <marquee bgcolor= "color code" width= "" height= "" > Scrolling text </marquee>
<!DOCTYPE HTML><HTML><Head><MetaCharSet= "Utf-8"><title>Multimedia pages</title></Head><Body><MarqueeBehavior= "alternate"bgcolor= "#66FFFF">Wang Bo</Marquee><BR/><BR/><MarqueeBehavior= "alternate"bgcolor= "#66CCFF"width= "$"Height= "$">Hale, better know the heart of the soul, poor and strong, do not fall into the ambition of the Qing</Marquee></Body></HTML>
Scrolling spatial Properties hspace, Vapace can set horizontal and vertical ranges
1 <!DOCTYPE HTML>2 <HTML>3 <Head>4 <MetaCharSet= "Utf-8">5 <title>Multimedia pages</title>6 </Head>7 <Body>8 do not set the effect of white space:9 <MarqueeBehavior= "alternate"bgcolor= "#FFCC33">Ten Tomorrow technology welcomes you! One </Marquee> ATomorrow Science and Technology is committed to the development of programming!!<BR/> - <HRColor= "#0099FF"/> - <BR/> the set an empty space that is 90 pixels horizontally and 50 pixels vertically: - <MarqueeBehavior= "alternate"bgcolor= "#CCCC00"hspace= "All"vspace= " the"> - Tomorrow technology welcomes you! - </Marquee> + Tomorrow Science and Technology is committed to the development of programming! - </Body> + </HTML>
HTML Learning Notes (11) Multimedia Page One