Teach you to use the active subtitle Mark--marquee

Source: Internet
Author: User
Tags range dreamweaver
Active subtitles, also known as scrolling kanban, scrolling subtitles. The use of active subtitles makes the entire Web page more dynamic, it appears very angry. More and more active subtitles are being used to enhance the interactivity of Web pages. You can use JavaScript programming to achieve the active caption effect, and use the Dreamweaver layer to use its timeline function to make very beautiful scrolling kanban. The HTML <marquee> Active subtitle tag requires the least amount of code, and it does get better results with less download time. The tag syntax is formatted as follows:


<marquee
Aligh=left|center|right|top|bottom
Bgcolor= #n
Direction=left|right|up|down
Behavior=type
Height=n
Hspace=n
Scrollamount=n
Scrolldelay=n
Width=n
Vspace=n
Loop=n>

It can be seen that because of the various display of active subtitles, there are many optional parameters. Here's what the parameters mean:
Align: is to set the position of the active caption, but in addition to the left, center, the right three positions, but also to increase the upper (align=top) and lower (Align=bottom) two positions.
bgcolor: The background color used to set the active caption, typically the hexadecimal number.
Direction: The scrolling direction used to set the active caption is left, right, up, and down.
Behavior: The way to set up scrolling is mainly in three ways: behavior= "Scroll" means scrolling from one end to the other, behavior= "slide": a quick slide from one end to the other, and no repetition; behavior= " Alternate "means to scroll back and forth between the ends.
Height: Used to set the height of the scrolling marquee.
Width: Sets the length of the scrolling marquee.
Hspace and Vspace: Sets the width of the left and right borders and the top and bottom borders of the scrolling marquee, respectively.
ScrollAmount: Used to set the scrolling distance of the active caption.
Scrolldelay: Used to set the delay time between scrolling two times.
Loop: Sets the number of times to scroll, when loop=-1 indicates that it has been scrolling until the page is updated.
<marquee> The default is to scroll to the left indefinitely, the caption height is the text height, scrolling range: The width of the horizontal scroll is the width of the current position; the height of the vertical scroll is the height of the current position.

Application Skills
1, all the default values, the least code, please see the following example
This scrolling caption all takes the default value, the source code:<marquee> here writes the caption content </marquee>, the code is not very few?

2. Vertical scrolling
Just add diriction= "up" to the line, such as <marquee direction= "Up" > here to write the subtitle content </marquee>.

3, multiple lines of text active subtitles
Because the <mqrquee> tag can only be used for a piece of text, many lines of active subtitles, branches can only use the <br> mark, can not use <p> tags.
Sample source code:

<marquee>
Active subtitle Content First line <br>
Active subtitles second line <br>
Active subtitles third line <br>
</marquee>

4, in the caption content to add the image
<marquee> is an active marquee tag, but it allows the image to be added to it. Here is a code added to the picture: <marquee> This is an active caption for adding images </marquee>

5. Use <marquee> mark in Dreamweaver
Dreamweaver cannot add marquee tags directly to the edit window, but you can add <marquee> tags to the source inspector and edit the contents of the active marquee in the edit window.
<marquee> tag more parameters, in the application to grasp a principle, can use the default value will not set the parameter value, with what parameters to set the value of the parameter, other parameters do not set to control the code in the least range.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.