Jump to content
GreenSock

SlOw-KiLLeR

Placing text behind an image

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

First of all, I would like to thank greensock for such a wonderful framework. I'm still a beginner, but I have learnt a lot from it, thanks to the easy-to-learn tutorials.

 

Recently I have tried creating an animation in greensock. The purpose of this animation is to create a sort of 'sliding' effect as soon as the user left clicks on the image.

I was successful enough to use the Bounce.easeOut effect.

Here's the real problem: I would like to place some text behind the image. So that when Bounce.easeOut takes full effect, I will be able to see the text.

 

I have created a function as follows:

function SlideFull() {

var slider = getElementById("image1");

TweenLite.to(slider, 3, {width:0, height:650, ease:Bounce.easeOut});

}

 

This function is triggered by the onclick event.

 

So, as soon as this function takes full effect, I would see the text behind this image. Would it be possible?

Thanks in advance

Link to comment
Share on other sites

Hello SlOw-KiLLeR, Welcome to the GreenSock Forums!

 

I'm a little confused on the text behavior you want, do you have an example of that text effect?

 

Also could you please create a limited codepen example. This way we can see your code in a live editable environment.

 

Here is a nice video tut by GreenSock on How to create a codepen demo example.

 

By setting up this reduced codepen example ,we can better help you and see code we can edit.

 

Thanks! :)

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