Jump to content
Search Community

rotate image out of viewport into the viewport as scrolling

rohitsinghshan test
Moderator Tag

Recommended Posts

Could you share a demo of your code, this way you get better support on this forum.

Quote

Make a minimal demo

This helps provide context and gives us a rough idea of what you’re trying to accomplish. It's WAY better than trying to dig into a live website with lots of other things going on, or looking at a small excerpt of code without much context. Pro tip: It's often easier to create a minimal demo from scratch rather than stripping out irrelevant things from your original project.

 

If I take a wild guess of what I think you're having trouble with is `transformOrigin:"75% 100%"` this property allows you to specify a point of and element (for you an image) on which it rotates 

 

  • Like 1
Link to comment
Share on other sites

1 hour ago, mvaneijgen said:

Could you share a demo of your code, this way you get better support on this forum.

 

If I take a wild guess of what I think you're having trouble with is `transformOrigin:"75% 100%"` this property allows you to specify a point of and element (for you an image) on which it rotates 

 

Thankyou for your reference sir, I have made codepen 

See the Pen dyJVaBV by shaan-singh (@shaan-singh) on CodePen

 

I want big light-blue toothbrush to work like a reference website. And if my script can be written in betterway then please tell me as I'm new to this

Link to comment
Share on other sites

1 hour ago, mvaneijgen said:

I've got something. Your brush was on the wrong side and was in the wrong orientation, so I've mirrored it, but that makes the text flipped. 

 

The rotation is no 180 degree, way less then that and it also moves from the right in the original example.

 

 

 

Thanks sir, this only I have to achieve but this text are also overlapping and I don't know why. can you solve this also?

Capture.JPG

Link to comment
Share on other sites

Hi @rohitsinghshan. weeding through almost 500 lines of HTML/CSS/JS to troubleshoot a custom implementation is a lot to ask in these forums (please read the forum guidelines) - if you'd like more help, you're welcome to post in the "Jobs & Freelance" forum for a paid consultant. Or if you have a GSAP-specific question (not custom logic), we'd be happy to answer those. 

 

Good luck with the project!

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