Jump to content
Search Community

ClipPath with ScrollTrigger (Safari issue)

crntn
Moderator Tag

Go to solution Solved by Cassie,

Recommended Posts

Posted

Hey, 

 

I'm trying to animate a clipPath from SVG, with ScrollTrigger. Everything's fine on Chrome, Firefox, … But as usual, Safari is a little freak.

Here's the idea : when the user scrolls, the clipPath scales to show us the entire image in the background.

Here's an online preview

 

The problem is : on Safari the transform-origin (to have a center scaling) is not respected, and the xPercent and yPercent (to center perfectly the clipPath) are ignored. And weirdly, the code generated by GSAP before scrolling is not the same on Chrome and Safari (cf. transform matrix).

 

I look forward to a response because I'm pretty lost. Thanks ! 

 

Posted

Hey Cassie !

 

Thanks for your time.

According to you, there's no alternative without using an image tag inside the SVG ?

I'd like to keep the same structure as in my demo with the img tag.

  • Solution
Posted

Also - don't animate the clip path itself. You want to be animating paths inside the clip path.

  • Thanks 1

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