Samuele Posted November 14, 2023 Share Posted November 14, 2023 Hi, I followed some code in a previous post to create a marquee effect with images. The code seems to work but after integrating it into the site, sometimes the logos overlap each other and the snippet breaks (see attachment), any ideas? Thanks See the Pen GRwxPmG by sml-k (@sml-k) on CodePen Link to comment Share on other sites More sharing options...
Rodrigo Posted November 14, 2023 Share Posted November 14, 2023 Hi, Your codepen has a few syntax errors in the CSS. Also you're adding the display flex property to the parent of the line element. The line element (which is actually the parent of the elements being targeted in the Loop helper function) should be the one with the flex display and should also have a flex-wrap: nowrap property as well, as shown in this demo: See the Pen RwqqKXd by GreenSock (@GreenSock) on CodePen Finally you should use the load event when it comes to working with images, or preload the images in order to know when they are loaded and ready. Here is a fork of your codepen with those changes: See the Pen OJdxJqd by GreenSock (@GreenSock) on CodePen Hopefully this helps. Happy Tweening! 1 Link to comment Share on other sites More sharing options...
Samuele Posted November 16, 2023 Author Share Posted November 16, 2023 Thank you so much, very appreciate it! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now