Linked Questions
41 questions linked to/from Restart animation in CSS3: any better way than removing the element?
2 votes
2 answers
2k views
How to trigger CSS animation [duplicate]
I am new to CSS but do know the basics, I want to trigger this animation by using a button. I cannot get it to work. I used a couple of examples here in Stackoverflow, Jquery, Jscript, but none seem ...
0 votes
1 answer
556 views
How to call a function for an animation multiple times [duplicate]
I took this code from another question "CSS Animation onClick". I was wondering if it could be possible to have a button that recall the function, even in the middle of the animation, so that it ...
0 votes
1 answer
123 views
Is there a way to make a CSS animation run again on repeated clicks of a button without using timeout? [duplicate]
I am trying to get an animation to run whenever a button is clicked. Right now, it only runs if the page is refreshed and does not run again on repeated clicks of the button. function ...
0 votes
1 answer
84 views
Javascript, CSS, button doesn't call the function for an animation after first click [duplicate]
Is there a way to call the function animation multiple times after first click without changing the HTML code? I need to keep id and class as they are in the code. I was trying to use display ...
0 votes
1 answer
67 views
How to run javascript function on every click on event? [duplicate]
This is a simple function, which works to do animation in my div with the help of onclick event. I want the animation to be restarted on every click, in other words, the function is reset after the ...
0 votes
1 answer
54 views
Question about execution sequence with toggling CSS attributes (namely animation) [duplicate]
So in this example, if I don't nest the box.style.animation = 'myanimation 3s' inside of the setTimeout, then the code doesn't work. But when I run it like this, with a timeout delay of ZERO, it works....
1 vote
0 answers
35 views
Javascript / CSS animation is only played once [duplicate]
I made an easy css keyframes animation like this @keyframes spin { from { transform:rotate(0deg); } to { transform:rotate(360deg); } } In my HTML code, after an onclick I trigger ...
80 votes
9 answers
81k views
How do I re-trigger a WebKit CSS animation via JavaScript?
So, I've got this -webkit-animation rule: @-webkit-keyframes shake { 0% { left: 0; } 25% { left: 12px; } 50% { left: 0; } 75% { left: -12px;...
101 votes
3 answers
58k views
What is DOM reflow?
I was reading about the difference between two CSS properties display:none and visibility:hidden and encountered the DOM reflow term. The statement was display: none causes a DOM reflow whereas ...
99 votes
2 answers
9k views
Why do browsers create vendor prefixes for CSS properties?
Maybe it's an obvious answer, but Why on earth would browsers decide to create their own vendor prefixes for border-radius and the like? I mean: Why do I have to type: -moz-border-radius: 10px; ...
13 votes
10 answers
11k views
CSS animation doesn't restart when resetting class
I am using CSS shader + animation. My shader class is defined as follows: .shader{ -webkit-filter :custom(url(v.vs) mix(url(f.fs) multiply destination-over), 200 200); -webkit-animation-name: test; -...
17 votes
4 answers
6k views
CSS change animation duration without jumping
I have a simple animation of a wheel spinning. I am trying to control the speed of the spinning wheel using a slider (input range). I have managed to do this, but every time I change the animation the ...
5 votes
2 answers
8k views
How to restart CSS Animation with minimal impact
Is there a way to restart a CSS animation without cloning elements, reflowing DOM, waiting (setTimeout/onAnimationEnd)?
7 votes
2 answers
11k views
Toggling a CSS3 animation on click
What is the best way to alternate the direction of a CSS3 animation on click without javascript? I've been exploring checkbox hacks lately and trying to figure out a way to have only one set of ...