Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 891105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:50:15+00:00 2026-05-15T13:50:15+00:00

anyone have an idea to make a marquee effect just like twitter ? its

  • 0

anyone have an idea to make a marquee effect just like twitter ?
its steamless ( doenst stop waiting for the loop ends ) + fadeing at the start and the end. thanks.

edit

ok edit, ive found one semi – steamless here http://jsbin.com/uyawi/3/edit but its still laggy + not really streamless maybe becouse the use of css?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T13:50:16+00:00Added an answer on May 15, 2026 at 1:50 pm

    Take a look at their code. They have placed two PNG images that fade from 100% opaque to 100% transparent. The two elements are placed inside their own <li>s at the end of a list of <li>s and inside a <ul>, and then positioned using CSS to float at either side of the <ul>.

    I’d highly recommend using Firefox+Firebug or Safari/Chrome and the developer’s toolbar. All these tools have a feature called “Inspect Element” which allow you to very quickly drill down to a specific element in the document and read its CSS.

    [EDIT]
    I need to build a scroller in the next week or so, so I wrote something up today. My code is going to be integrated into Adobe Air, so I’m not doing any cross-browser checks. The CSS here likely will need to be tweaked. I first tried playing with Remy Sharp’s Silky Smooth Marquee, but adding that code destroys and recreates most of the HTML making the transparent wings difficult to integrate. The code to build a scroller is not that hard, so I just rolled my own. The code below is in five parts:

    1. The curtain image

    For this to work, I temporarily borrowed Twitter’s curtain image and saved it to my webroot at /images/left-right-fader.png. Their fader is for a specific color scheme, so I’ll be replacing it with my own. Be a good citizen and make your own, too. The image in this case is 120px wide with the left curtain at the left edge and the right curtain at the [60,0] point. In other words, it is a single 120px-wide image that fades from 100% opacity at the left edge to 0% opacity in the middle to 100% opacity at the right edge. If you change the image dimensions, you will need also to change the CSS. The height does not matter because it tiles.

    Extra-points: if you are targeting a Webkit or Firefox browser, you should be able to eliminate the image and use a regular HTML element (div/span) with a gradient background.

    2. The CSS

    body,div {border:none;padding:0;margin:0;}
    div#marquee {
        position:relative;
        overflow:hidden;
        background-color:#000;
        color:#ddd;
    }
    div#marquee div.scrollingtext {
        position:relative;
        display:inline;
        white-space:nowrap;
    }
    div#marquee div.fader {
        width:60px;
        position:absolute;
        background:url(/images/left-right-fader.png) repeat-y scroll 0 0 transparent;
        top:0;
        left:0;
    }
    div#marquee div.fader.left {
        background-position:-60px 0;
        left:auto;
        right:0;
    }
    

    3. The Marquee ‘class’

    Usage:

    var mMarquee = new Marquee(jTarget,strText,intWidth);
    
    1. jTarget is a jQuery reference to an empty div where you want the scroller to appear (eg. if you want the marquee to show up in <div id="myMarqueeDiv"></div>, you would use $('div#myMarqueeDiv')
    2. strText – the string you want to have scroll;
    3. intWidth – how wide you want the scroller to be.

    Right now, it returns a Marquee object with no public methods. It’s simple enough to add some public methods (for example, as stop() method or restart() method).

    Here is the code:

    var Marquee = function(j,s,w) {
        var self = this;
        var jTarget = j;
        var strText = s;
        var intWidth = w;
        var intPaddingLeft = 60;
        var jText,intTextWidth;
        var update = function() {
            intPaddingLeft -= 2;
            if (intPaddingLeft < -intTextWidth) {
                intPaddingLeft += intTextWidth;
            }
            jText.css({'left':intPaddingLeft + 'px'});
        };
        var setup = function() {
            jText = $('<div class="scrollingtext"></div>').text(strText);
            jTarget
                .append(jText)
                .append($('<div class="fader"></div>').html('&nbsp;'))
                .append($('<div class="fader left"></div>').html('&nbsp;'));
            intTextWidth = $(jTarget).find('.scrollingtext').width();
            jTarget.width(intWidth);
            jText.text(strText + " " + strText);
            update();
        };
        setup();
        setInterval(update,30);
        return self;
    };
    

    4. The HTML

    In this specific example, my body looks like this:

    <body>
        <div id="marquee"></div>
    </body>
    

    5. Implementation code

    strLoremIpsum = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut...";
    
    jQuery(function($) {
        myMarquee = new Marquee($('div#marquee'),strLoremIpsum,500);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone have an idea how to make a countdown ticker that shows the
Anyone have idea how to make control over volume. I mean i want to
Anyone have any idea how to get the value of Language for Non-Unicode Programs
Anyone have any idea how to get the SACL's on a remote service using
Does anyone have any idea what is wrong with this create statement for mysql?
Does anyone have an idea how can I fix this vulnerability in Apache 2.2.4
This may be a doozy, but does anyone have an idea how to: Pass
Welcome, I notice that Youtube make some changes into their website code. Anyone have
Anyone have an idea how I can create a usercontrol that is only available
Does anyone have any idea if there is anything planned in the html5 or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.