Infinite Scroll text behind and infront of a image

I am trying to achive this section where a text scroll like marquee behind the image and another text scroll in front of that image. I tried positioning it with z-index but not working as I wanted. I am using tailwindcss for styling
No description
10 Replies
clevermissfox
clevermissfox4w ago
Do you have a link to the live project? and z-index will only work in a flex or grid container or if there is a position other than static (e.g. position: relative) on it.
ahmd shajmeer
ahmd shajmeerOP4w ago
No, I cleared all the code am trying to do again from the scratch, so if you have any idea how do you approach this design like how many div tags or something
clevermissfox
clevermissfox4w ago
<section class="wrapper" style="background-image: linear-gradient(orange, lightorange); display: grid;">
<h1>Develop...</h1>
<img src="person.webp" />
<h2>science...<h2>
<section>
<section class="wrapper" style="background-image: linear-gradient(orange, lightorange); display: grid;">
<h1>Develop...</h1>
<img src="person.webp" />
<h2>science...<h2>
<section>
Start a codepen with what you have and what you're trying and then link it in this thread
ahmd shajmeer
ahmd shajmeerOP4w ago
Sorry for the delayed reply , https://codepen.io/ahmd_shajmeer/pen/QwLMYMJ , I worked on this but how to achieve the infinite scroll effect on this , as you can see in the codepen the text starts from position, so instead of that I want to remove that start or end , just scroll all time.
clevermissfox
clevermissfox4w ago
Im not clear what youre saying. the text starts from position (?) and you want to remove the start or end (?) ?? Do you have an example of what you are trying to emulate?
ahmd shajmeer
ahmd shajmeerOP4w ago
clevermissfox
clevermissfox3w ago
right, i get the infinite scroll part but as far as the text positioning, im not understanding what youre saying. This example has a jump at 0:03 and it goes > right, but yours looks like you want it to go < left
MarkBoots
MarkBoots3w ago
Kevin Powell
YouTube
Create an infinite horizontal scroll animation
🎓 Did you know I have courses? Both free and premium ones: https://kevinpowell.co/courses?utm_campaign=general&utm_source=youtube&utm_medium=infinitescroll Infinite scroll animations for things like logos are relatively common these days, but there is a lot that we can do incorrectly when making one, so I decided to try and make one that respec...
ahmd shajmeer
ahmd shajmeerOP3w ago
I have achieved similar scroll effect using only tailwindcss but it is not in a loop, so I tried a trick from YT that dupicating the content but it also not working. Is it possible achieve that without any JS.

Did you find this page helpful?