This work in simple html css but how to use style and give --i value in react
<span style="--i:3;" className="this">
p
</span>
CSS this is how i used this --i in css
span {
animation: animate 1s ease-in-out infinite;
animation-delay: calc(0.1s * var(--i));
}
@keyframes animate {
0% {
transform: translateY(0px);
}
20% {
transform: translateY(-20px);
}
40%,
100% {
transform: translateY(0px);
}
}