Jump to content
Search Community

How to animate multiple images on hover from 0 to 1 with GSAP?

Galanthus test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi,

 

I am trying to replicate something like this on hover: http://vlnc.studio/

There are multiple images on the background, where when you hover each image it will animate/fade from 0 to 100%.

I have tried Canvas.. but it is a hell to make it work. I am wondering if someone can help me out, or point me out to the right direction

to a demo or something similar.

 

What i am trying to, is add like 14 images on the background and on hover change the opacity of each image from 0 to 100%.

 

Is this something i can do with GSAP and if so can someone help me out?


 

 

 

See the Pen VwZJBwr by Merdzanovich (@Merdzanovich) on CodePen

Link to comment
Share on other sites

Hi @Galanthus,

 

I'm not sure your requirement is to use canvas for this, but this is something GSAP can certainly handle. You can choose to use jQuery (or not) for simplifying some event listeners ... regardless, the GSAP part is very simple! I would use simple Tweens vs Timelines because there isn't too much to control. Here is an example ... note I haven't gone through the effort of placing the images in a mosaic fashion ... but you'll get the idea.

 

See the Pen zYOVMpw by sgorneau (@sgorneau) on CodePen

  • Like 3
  • Haha 1
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...