Jump to content
Search Community

Cornetto

Premium
  • Posts

    3
  • Joined

  • Last visited

About Cornetto

Cornetto's Achievements

  1. Hello, I have a fromTo tween. like this: gsap.fromTo( slide, { x: 20, opacity: 0 }, { x: 0, opacity: 1, duration: .2, } ); In this case the x value of the from is 20. But another time the x value is 0, so i only want to animate the opacity. That is going well, but the only thing is. The x property is also set, when its 0. The question is: How can i use the same tween but with other values. Do i need to make an object with the, from values and, to values? I can write an if else statement but i think there is a quicker and cleaner way. I would like to hear what the best solution for this is. Thanks in advance!
  2. Hej @ZachSaucier, thanks for your quick reply! That explains a lot ! Thanks. For now i have two options: First (but not best), change width and left positions. Second, change flex-grow. I updated the codepen. Again, thanks for your help!
  3. Hii, I am starting to learn GSAP, it's awesome! But i am stuck with an animation. I have two planes, a black plane (left one) and a white plane (right one). When i hover (for example) on the black plane, i want it to become wider to the right so all the content is visible. And when i hover it, the white plane needs to go to the right. The same applies to the white plane but that plane needs to become wider to the left and the black plane needs to go to the left. That part was successful! What the problem is: But now, when i hover on the black plane and i go with the mouse straight away to the white plane it bugs a little and i have no idea how to fix that. I hope I have sorted it out as well as possible. Thanks in advance.
×
×
  • Create New...