Responsive GSAP problem

Sep 11, 2023

Hello to all colleagues, I ran into a serious problem and so far I haven't found a clear solution that I can understand. I used a simple GSAP code to make a progress bar (of course, the project contains more similar codes), but when the user shrinks the browser window, this code does not work well and the location of the progress bar changes.
I want to write this code in a responsive way, but I don't know how. Also, I want to know the rule of writing responsive for other objects of my project. I would be grateful if someone could help me with this.

The code I used in this progress bar is as follows:
const Object1 = document.querySelector("[data-acc-text='Rectangle 1']");
gsap.to(Object1, { scaleX: '+=0.5', transformOrigin: "left center", duration: 1 });
Be the first to reply