Is there a method to ascertain the direction of rotation for the CSS property transform: rotateY?
I have been attempting to spin this h1 element from one side to the other, but regardless of using a positive or negative sign, it always rotates in the same direction.
h1 {
display: inline-flex;
font-size: 50px;
font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
letter-spacing: 4px;
color: white;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
white-space: nowrap;
z-index: 3;
transform-style: preserve-3d;
animation: rotate 2s infinite;
}
@keyframes rotate {
0% {
}
33% {
transform: rotatey(40deg);
}
66% {
transform: rotateY(0);
}
100% {
transform: rotatey(-40deg);
}
}
<h1>Example</h1>
Appreciate any assistance on this matter