Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

9
  • Nice solution, if it needs to work only once. After the class has been added, subsequently adding the class does (logically) not result in flashing the element.
    – simon
    Commented Mar 8, 2013 at 7:54
  • 8
    The best idea ever. I used a settimeout to remove the class 2 seconds after the effect
    – insign
    Commented Aug 24, 2013 at 17:44
  • 7
    Here's an example of removing the class after the animation's done so you can keep flashing it. jsfiddle.net/daCrosby/eTcXX/1
    – DACrosby
    Commented Apr 11, 2014 at 1:05
  • Great, that works, but note that the correct property for the background-color is 'transparent' instead of 'none' if you want to pass a style sheet validator.
    – Jan M
    Commented Dec 16, 2014 at 10:28
  • 1
    Note that all modern browsers now support the regular @keyframes and animation rules, so there's no need to use any prefixed versions besides maybe -webkit- (for the Blackberry browser). Commented Oct 16, 2017 at 23:14