Hello Shopify Community,
I’m a beginner working on a custom section. I’ve created a scrolling text animation, but I’m facing a “blinking” or “flickering” issue every time a set of text exits the viewport. I’ve tried various solutions, but the problem persists.
Here’s a simplified version of my code:
{{ block.settings.text }}
{{ block.settings.text }}
{{ block.settings.text }}
.sl-scrolling-text-wrapper {
overflow: hidden;
position: relative;
white-space: nowrap;
}
.sl-scrolling-text {
display: inline-block;
position: relative;
will-change: transform;
transform: translate3d(0, 0, 0);
backface-visibility: hidden;
animation-timing-function: linear;
}
@keyframes scrollText {
{% if section.settings.orientation == 'rtl' %}
0% {
transform: translate3d(0, 0, 0);
}
100% {
transform: translate3d(-33.33%, 0, 0);
}
{% else %}
0% {
transform: translate3d(-33.33%, 0, 0);
}
100% {
transform: translate3d(0, 0, 0);
}
{% endif %}
}
The text scrolls, but there’s a noticeable flicker when one set of text exits and the next set starts to appear.
Any guidance or suggestions would be greatly appreciated!
Thank you in advance!