Jump to content
Search Community

Use drawSVG on ::before pseudo element? Possible?

Rossmiester test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

  • Solution

Pseudo elements are not accessible to JavaScript. That's a browser limitation, unrelated to GSAP. 

 

Usually a good workaround is to use CSS variables (GSAP can animate those), but that might be tricky for a drawSVG effect. If you can use a normal element, that's probably best. 

  • Like 3
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...