1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Blinking effect in CSS

Discussion in 'CSS' started by RDJLabs, Jan 23, 2010.

  1. #1
    How can I add blinking effect on text using css? I want my text to be blinked. Is it possible? Please help me regarding this
     
    RDJLabs, Jan 23, 2010 IP
  2. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You're asking us to help you induce seizures in epileptics and screen-breaking rage in everyone else?

    This is one of those things that, when explained that it can be done with CSS, is always followed with one of those warnings with the red background and the black skull and crossbones that say "use of this CSS property is known to cause AIDS, cancer, diabetes and parasitic infections across the world. DO NOT USE".

    On the other hand, I'm feeling evil and destructive today.

    #element {
    text-decoration: blink; /*MAY CAUSE BLINDNESS IN CHILDREN. SEEK MEDICAL ATTENTION IF INGESTED*/
    }

    Lord knows if it actually works in all browsers... I would not be surprised to find those tricky Norwegians have actually disabled it in Opera or something.

    Don't come crying to me when the pitchfork and torch-bearing hordes come marching towards your castle on the hill screaming "KILL THE MONSTER". Your funeral.
     
    Stomme poes, Jan 23, 2010 IP
  3. FilmFiddler

    FilmFiddler Greenhorn

    Messages:
    54
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    23
    #3
    Just a bit curious about this, so I did a quick test with FF3.5 and Opera 9.64 (didn't try ver. 10). Turns out they not only do support CSS 'text-decoration: blink;', but they also still support the old <BLINK> tag - which IE used to support back in the days of about IE3 or IE4, then quickly dropped it. And IE has never supported 'text-decoration: blink;'. And webkit-based browsers haven't supported either method.

    Anyway, curiosity aside, I agree that where blinking text is used, it is mostly for a novelty effect, and probably overdone about 90% of the time, and in some instances is just really bad. On the other side of the coin, blinking text may be no more annoying than animated gifs, which aren't exactly rare these days.

    RDJLabs, if you really want blinking text, hopefully in great moderation, and done rather s-l-o-w-l-y, you really have to do it with JavaScript, because of the understandably patchy support of that effect in either CSS or html among the browsers. Also, by doing it with js, it complies (well, sort of .. ) with the W3C guidelines for such novelty effects, which state that users should have the ability to turn such effects off if they desire. Which they don't seem to have if the <BLINK> tag is being used. See:
    Web Content Accessibility Guidelines 1.0 - especially Guideline #7
    http://www.w3.org/TR/WCAG10
     
    FilmFiddler, Jan 25, 2010 IP
  4. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #4
    The link in my sig is an excellent use of both blink tags and marquee... Evan Goers thought the world would maybe be more awesome now that browsers could use both... or not : ) I can no longer find the accompanying web page that went with Pointy Birds, where he described which browsers he found still working (but IE6 was certain).

    I had never tested text-decoration: blink, so did not know (but am not really surprised) that IE did not support it (IE8 team is claiming that IE8 supports CSS2.1 100% so it's gotta be in there now : )
    however that current browsers still support it, I do expect, simply because it's hard to remove something like that from the trunk, and because they also don't like "breaking the web".

    I did find out from someone that Google Chrome (being a new browser only loosely based on others, and thus without some of the baggage other browsers have) did/does not support <marquee>.

    Which I do believe is a Good Thing.
     
    Stomme poes, Jan 26, 2010 IP