question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Animations not working properly on elements with css transition applied

See original GitHub issue

Setting for example transition: all .35s ease on an element and then trying to animate it with anime.js results in very weirdly behaving animations.

Example: https://codepen.io/elias-g/pen/PeMjVw

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
alexchantasticcommented, Jun 2, 2018

Depending on what transitions and animations you want to achieve, the easy way would be to only have transition target the individual properties that you want to transition instead of all.

However, if you must use all, then removing the transition from the element and then adding it back after the animation has completed would be a good starting point. Something like this: https://codepen.io/alexchantastic/pen/zavXzq/

The issue with the example though is if you are transitioning and animating on the same property. In this case, you would need to re-declare the :hover transition with the end result of your animation.

0reactions
eliasghorwallcommented, Jun 4, 2018

Awesome, thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS3 Transition not working - Stack Overflow
A general answer for a general question... Transitions can't animate properties that are auto. If you have a transition not working, ...
Read more >
CSS Animations Not Working? Try These Fixes - HubSpot Blog
Learn how to fix common CSS animation error and get your animations looking how you want them.
Read more >
Using CSS transitions - CSS: Cascading Style Sheets | MDN
CSS transitions let you decide which properties to animate (by listing them explicitly), when the animation will start (by setting a delay), ...
Read more >
ANIMATE CSS NOT WORKING !!! Fix Animate CSS ... - YouTube
I have linked animate CSS with it and applied relevant CSS animation classes to elements that are needed. Even when I am doing...
Read more >
An Interactive Guide to CSS Transitions - Josh W Comeau
For example: let's say that we're moving an element from left to right, over a 1-second duration. A smooth animation should run at...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found