Marquee Behavior to move text in different styles

Marquee scroll slide or alternate behavior

Behavior:

Specifies how the marquee text should move. Possible values for this attribute are SCROLL or SLIDE or ALTERNATE

HTML marquee tag to scroll or alternate text or image on web page with various speed and direction



We will discuss all these with some examples on how to manage these values.

Scroll:

This is the default behavior. This lets the Text to scroll across the screen like a stock ticker i.e., the text should start from only one side and it should scroll completely to the opposite end and start again

Example:

This is an Example Marquee (Behavior : Scroll)
Code:

<marquee bgcolor="#000080" style="color: #FFFFFF; font-family: Book Antiqua" behavior="scroll" > This is an Example Marquee (Behavior : Scroll)</marquee>

Slide:

This lets the text move from one end to the other end and once the text reaches the other end it stops scrolling

Example: ( Only in IE)

This is an Example Marquee (Behavior : Slide)

Code:
<marquee bgcolor="#000080" style="color: #FFFFFF; font-family: Book Antiqua" behavior="slide">This is an Example Marquee (Behavior : Slide)</marquee>

Alternate:

This lets the Marquee text to alternate between scrolling and sliding i.e., Starts from one end and on reaching opposite end it moves in the opposite direction

This is an Example Marquee (Behavior : Alternate)
Code:

<marquee bgcolor="#000080" style="color: #FFFFFF; font-family: Book Antiqua" behavior="alternate" > This is an Example Marquee (Behavior : Alternate)</marquee>

Alternate : with UP down direction

direction='up' behavior ='aleternate' Code:
<marquee style="font-family: Book Antiqua; color: #FFFFFF" bgcolor="#000080" direction="up" height="80" behavior="alternate" >direction='up' behavior ='aleternate'</marquee>

Starting from Right and stopping at center

This is not a direct solution by using Marquee properties but can give idea on how to manage this tag for different requirements.

Start from Right & stop at center
<div  align="right" style="width:50%;float:right ;">
<marquee  direction="left" >Start from Right & stop at center</marquee>
</div>

HTML marquee Tag Marquee Scroll Direction Mouseover Scroll control

Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com







    Vijay

    10-04-2012

    Very usefula nd to the point thanks
    agus kaosgrosir

    06-09-2012

    I see behavior=slide only stop in the left. What happened ? Regards
    Harrshit Gill

    04-03-2014

    This is really useful
    tshepiso bareetseng

    25-06-2014

    how do i scrool to the right
    smo

    25-06-2014

    You can give direction like direction='right'
    manju

    30-06-2014

    what is the formula scrolling from left side
    Muhammad irfan

    24-07-2015

    realy nice tips
    irfan

    17-03-2017

    how we can make a text start from right corner and stop at center ?
    smo1234

    20-03-2017

    This part is added now. This is not a direct solution but can be used.
    Aditya Soni

    25-01-2019

    The 'Alternate' Behavior is not working in Up and Down direction . Can you solve this?
    smo1234

    08-02-2019

    This part is added.

    07-12-2019

    in your website have a fantastic example that is very benefits ,thanks

    24-12-2020

    I figured out how to make it scroll up but it always starts from the very bottom of the page
    can you add a section for scrolling up but starting from the very top?

    Thanks

    17-06-2021

    Many thanks, clarified a doubt I had.

    13-10-2021

    Tks a lot

    08-01-2024

    Behevior=“slide”



    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer