Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS transform-translate isn't working with animation Reply To: transform-translate isn't working with animation

#266048
bearhead
Participant

The transforms in the animation are overriding the transform on the div. I’d recommend wrapping the spinner div in parent div, and then translate the parent div.

Or if you need to do it with a single element, use two animations. One for the div and another for the :before and :after pseudo elements. On the animation for the div, add the translate to each keyframe.