krisxtina Posted July 12, 2022 Share Posted July 12, 2022 Hello! Can you please tell me how can I change the color of the cursor depending on the section using gsap? Of section 1 I want white cursor, and on footer black cursor. See the Pen zYWKvmx by Kisa777Zaika (@Kisa777Zaika) on CodePen Link to comment Share on other sites More sharing options...
Cassie Posted July 12, 2022 Share Posted July 12, 2022 Hey there, This is best done with mix-blend-mode. Nice and simple, just one line of css See the Pen yLKaOLg by GreenSock (@GreenSock) on CodePen Link to comment Share on other sites More sharing options...
balocreation Posted July 12, 2022 Share Posted July 12, 2022 Thanks @Cassie However its not applying the default css rule when you over on DOM element. Link to comment Share on other sites More sharing options...
Cassie Posted July 12, 2022 Share Posted July 12, 2022 Not entirely sure what you mean by that - but if you want to change the actual color when it's over a certain section you could use event listeners and then tween to a new color. See the Pen qBoaXam?editors=1111 by GreenSock (@GreenSock) on CodePen Link to comment Share on other sites More sharing options...
krisxtina Posted July 12, 2022 Author Share Posted July 12, 2022 8 hours ago, Cassie said: Hey there, This is best done with mix-blend-mode. Nice and simple, just one line of css Link to comment Share on other sites More sharing options...
krisxtina Posted July 12, 2022 Author Share Posted July 12, 2022 1 minute ago, Cassie said: Not entirely sure what you mean by that - but if you want to change the actual color when it's over a certain section you could use event listeners and then tween to a new color. Thank you! I thought there was something special for this idea 1 Link to comment Share on other sites More sharing options...
balocreation Posted July 13, 2022 Share Posted July 13, 2022 5 hours ago, Cassie said: Not entirely sure what you mean by that - but if you want to change the actual color when it's over a certain section you could use event listeners and then tween to a new color. I can't click or hover on html elements. Example: I can't toggle an accordion. Link to comment Share on other sites More sharing options...
GreenSock Posted July 13, 2022 Share Posted July 13, 2022 It's difficult to troubleshoot blind (you didn't provide a minimal demo for that, did you?) but my guess is that you forgot to set the CSS pointer-events: none on your circles, so they're absorbing the events. Link to comment Share on other sites More sharing options...
balocreation Posted July 13, 2022 Share Posted July 13, 2022 Thanks, it now work perfectly... I really appreciate. 1 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