Home  >  Article  >  Web Front-end  >  Novices learn old knowledge (2) Use HTML active subtitles to mark mar

Novices learn old knowledge (2) Use HTML active subtitles to mark mar

黄舟
黄舟Original
2016-12-26 15:11:211824browse

Active subtitles, also known as rolling billboards and rolling subtitles. The use of active subtitles makes the entire web page more dynamic and lively. Active subtitles are increasingly used in today's websites to enhance the interactivity of web pages. You can use Javascript programming to achieve active subtitle effects; you can use Dreamweaver's layers and its timeline function to create a very beautiful scrolling board. The use of HTML active subtitle tags requires the least code and can indeed produce better results with less download time. The syntax format of this tag is as follows:


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 due to the various display methods of active subtitles, there are also many optional parameters. The following explains the meaning of each parameter:

Align: It sets the position of the active subtitles, but in addition to the three positions of left, center, and right, it also adds top (align=top) and bottom ( align=bottom) two positions.

Bgcolor: used to set the background color of active subtitles, usually a hexadecimal number.

Direction: Used to set the scrolling direction of active subtitles to left, right, up, or down.

Behavior: Used to set the scrolling method. There are three main methods: behavior="scroll" means scrolling from one end to the other end; behavior="slide": means quickly sliding from one end to the other end. And no more repetition; behavior="alternate" means scrolling back and forth between the two ends.

Height: used to set the height of rolling subtitles.

Width: Set the width of the rolling subtitles.

Hspace and vspace: used to set the width of the left and right borders and the top and bottom borders of rolling subtitles respectively.

Scrollamount: used to set the scrolling distance of active subtitles.

Scrolldelay: Used to set the delay time between scrolling twice.

Loop: used to set the number of scrolls. When loop=-1, it means scrolling until the page is updated.

The default of

mark is to scroll to the left infinite times, the subtitle height is the text height, and the scroll range: the width of horizontal scrolling is the width of the current position; the height of vertical scrolling is the current position. high.


Application Tips

1. Take all the default values ​​and use the least code. Please see the example below

This rolling subtitle takes all Default value, source code:

Write subtitle content here

, is there very little code?

2. Vertical scrolling

Just add diriction="up", such as

Write subtitle content here

.

3. Active subtitles for multi-line text

Since the mark can only be applied to a section of text, multi-line active subtitles can only be marked with
when branching into separate lines, and

cannot be used.

mark.

Sample source code:


The first line of active subtitle content

The second line of active subtitle content

Activity The third line of subtitle content

4. Add images to the subtitle content

Although

is an active subtitle mark, it allows Add an image. The following is a code for adding images: This is the

for adding images. The above is the old knowledge for novices to learn (2) HTML uses active subtitles to mark mar content. For more related content, please pay attention to the PHP Chinese website ( www.php.cn)!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn