Jump to content
Search Community

SVG Graphic not overlap

TirochH 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

Hello TirochH, and Welcome to the GreenSock forum!

 

That is a lot of code to go through. This is more of a CSS question than a GSAP related question ;)

 

But, the reason the svg's don't overlap is because the <svg> element has a default CSS position property value of static. So you would have to use CSS position:absolute to have them overlap.

 

See the Pen OmxaJo?editors=0100 by TirochH (@TirochH) on CodePen


 

svg {
  position:absolute;
}

Resource:

CSS position property: https://developer.mozilla.org/en-US/docs/Web/CSS/position

 

:)

  • Like 3
Link to comment
Share on other sites

Now I reduced my code   again.

 

I have insert always 'absolute'. Nothing change as I want.

 

Hans

 

PS: I add     this also direct in CSS. You are right.

Than it is O K:

But I want use it without CSS: How I insert the identical in javascript?

Link to comment
Share on other sites

You still have a lot of code in your example. Can you please reduce your codepen demo to only the issue you are having.

  • Also can you please be more specific in how it should be the way you want?
  • And what is the specific GSAP question you have?

Thanks.

  • Like 2
Link to comment
Share on other sites

I'm a little confused too. It all looks right to me. 

 

Just an FYI - you're using an old version of GSAP (1.18) when you should be using the latest (1.19.1). You've also got an old version of snap (0.4.1) while the latest version is (0.5.1).

 

Happy tweening.

:)

  • 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.
×
×
  • Create New...