Jump to content
Search Community

how can i make it responsive?

Elia test
Moderator Tag

Recommended Posts

Hi @Elia this can be done through CSS, I've given your images a fixed with (If the height is 500px a width 281px is around a 9:16 ratio) flexbox by default will try to fit all the elements in the container, but if you set flex-shrink: 0; it will not allow it to become smaller.

 

The feather edges I've done by adding an :after element to your image with a gradient in it that goes from white to transparent and back to white again. Manually writing out a gradient is a bit tedious in my opinion, so I've used this tool https://cssgradient.io

 

These are not really GSAP questions which this forum is focused on. Having a great understanding of CSS is really important when working with GSAP, so be sure to stock up on those skills. Hope it helps and happy tweening! 

 

See the Pen wvQEOXa?editors=0100 by mvaneijgen (@mvaneijgen) on CodePen

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