Jump to content
Search Community

gsap.from() didn't work on the a tag button

Ndubuisi AndeOrji test
Moderator Tag

Go to solution Solved by mvaneijgen,

Recommended Posts

  • Solution

Hi @Ndubuisi AndeOrji welcome to the forum!

 

If you want to animate elements using GSAP, you have to let GSAP handle all the animations! If you in your CSS then also try to animate/transition something CSS and GSAP will fight for control over who will animate the element. 

 

I've disabled line 148 in your CSS transition: .3s; This line will tell the browser to animate EVERYTHING over a duration of 300ms . This is probably for the hover animation that will change the color so you could set it to transition: background-color .3s; to CSS only transitions the background-color, but be aware of this logic when working with GSAP.

 

Hope it helps and happy tweening! 

 

See the Pen zYavXMp?editors=0100 by mvaneijgen (@mvaneijgen) on CodePen

  • Like 2
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...