Skip to content
Advertisement

Tag: css-animations

CSS Shimmer effect with blocking JavaScript

I have a shimmer React component with the following CSS and the animation keyframe I apply to it is as follows: My home page is quite heavy on mount. So the animation freezes for about a second or so. I read that animating transition is done off-thread https://www.phpied.com/css-animations-off-the-ui-thread/ Can anyone help me do my shimmer effect in a similar off-thread

Trigger CSS Animations in JavaScript

I don’t know how to use JQuery, so I need a method which could trigger an animation using JavaScript only. I need to call/trigger CSS Animation when the user scrolls the page. Answer The simplest method to trigger CSS animations is by adding or removing a class – how to do this with pure Javascript you can read here: How

Advertisement