Jump to content
Search Community

Simple opacity on images

ceescoenen test
Moderator Tag

Recommended Posts

Welcome to forums @ceescoenen

 

Have you checked out our Getting Started guide? Go through that, and then check out a Timelines.

 

Your animation sounds pretty straightforward. Just set the opacity of your images to 0 in your CSS, and then animate them in. 😀

 

gsap.timeline()
  .to("#image1", { opacity: 1, duration: 0.75 })
  .to("#image2", { opacity: 1, duration: 1 })
  .to("#image3", { opacity: 1, duration: 1.25 });

 

If you need anymore help, please put what you have in a minimal demo

  • Like 2
Link to comment
Share on other sites

9 minutes ago, OSUblake said:

Welcome to forums @ceescoenen

 

Have you checked out our Getting Started guide? Go through that, and then check out a Timelines.

 

Your animation sounds pretty straightforward. Just set the opacity of your images to 0 in your CSS, and then animate them in. 😀

 

gsap.timeline()
  .to("#image1", { opacity: 1, duration: 0.75 })
  .to("#image2", { opacity: 1, duration: 1 })
  .to("#image3", { opacity: 1, duration: 1.25 });

 

If you need anymore help, please put what you have in a minimal demo

 

Thank you. This works but it isn't smooth. How can I make this more smooth?

 

Link to comment
Share on other sites

You're using an elastic ease. 

gsap.timeline()
.to("#image1", { opacity: 1, duration: 0.75, ease: "power1" })
.to("#image2", { opacity: 1, duration: 1, ease: "elastic" })
.to("#image3", { opacity: 1, duration: 1.25, ease: "elastic" });

Please try "linear" or "none"

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