Jump to content
Search Community

How to target pseudo element (eg. :before, :after) in v3?

n.watanabe test
Moderator Tag

Go to solution Solved by OSUblake,

Recommended Posts

Hi. I have a question about how to target :before element and run a tween on it, and need help to run my codepen demo.

 

I found some people have shown a demo targeting ".class:before"[1][2][3][4], and came across a website[5] that is apparently using GSAP and targeting :before element. However, I also found other people said it is impossible[6], and my codepen demo doesn't work. Can anyone fix my codepen to target :before element?

 

I'm using the latest version of GSAP ("gsap": "^3.9.1") with nextjs for my production environment. Thank you in advance.

 

[1] 

[2]

[3]

[4] 

[5] https://giginc.co.jp/

[6]

 

See the Pen MWrerqV?editors=1111 by asterisk37n (@asterisk37n) on CodePen

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...