Nickicool Posted August 25, 2020 Share Posted August 25, 2020 I'm trying to animate the appearance of an svg icon with a description below it. The icon has a wrapper with the pseudo elements :before and :after with a different background color. I want to animate the zoom of a pseudo element, but nothing works. The background color changes, but the zoom doesn't work. gsap.registerPlugin(ScrollTrigger, CSSRulePlugin); gsap.to( CSSRulePlugin.getRule(".icon-wrapper:before"), { duration: 3, cssRule: { transform: 'scale(3)', background: 'red' } }); Help me, please. I don't know what to do. Link to comment Share on other sites More sharing options...
Visual-Q Posted August 25, 2020 Share Posted August 25, 2020 I think you just want use scale: 3 not transform: 'scale(3). See the Pen LYNWLrY by Visual-Q (@Visual-Q) on CodePen 3 Link to comment Share on other sites More sharing options...
Nickicool Posted August 25, 2020 Author Share Posted August 25, 2020 2 hours ago, Visual-Q said: I think you just want use scale: 3 not transform: 'scale(3). Yes, this is what you need! Thanks!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now