Scrolling text or marquee is usually a block of texts that moves from left to right or vice versa, and up to down or vice versa. It is a good way to deliver news, updates or important announcements as it easily captures users’ attention because it scrolls.
The simplest marquee text that you can do is a scrolling text that moves from right to left:
<marquee>scrolling text here</marquee> |
If you want to change the text to move to the right instead, just add the code:
<marquee direction=”right”>scrolling text here</marquee> |
Background color is set to white by default. To change the color, add the code:
<marquee bgcolor=”#82C1FF”>scrolling text here</marquee> |
The code in between the quotation marks are the hexadecimal color code equivalent of the background color of the example above. Many hexadecimal color code generators are available on the web. Just google “hexadecimal color code generator”.
To scroll the text up:
<marquee direction=”up” bgcolor=”#82C1FF”>scrolling text here</marquee> |
Of course, you can remove the bgcolor marquee attribute anytime if you don't want a background color.
To scroll the text down with background color:
<marquee direction=”down” bgcolor=”#82C1FF”>scrolling text here</marquee> |
To make the scrolling text bounce between left and right:
<marquee behavior="alternate" bgcolor="#82C1FF">scrolling text here</marquee> |
The scroll speed can also be adjusted by using the following scrollamount marquee attribute.
<marquee bgcolor="#82C1FF” scrollamount=”10">scrolling text here</marquee> |
The above attributes are the commonly used customization that you can do to marquees.
No comments:
Post a Comment