Rotation in z axis in Unity UI document elements

I want to achieve an effect that rotates and brings a view to the front. It was possible in regular UI system. Where I could rotate any UI element or the canvas in Z axis. But in the UI document only 2d rotation is possible as far as I can see. I tried USS as well. But the rotation seems not working. Maybe keyframe is not supported.
Can you guys give me a solution on this?

_
        AchievementElement.AddToClassList("rotate-in");
_
@keyframes rotateOut {
    0% {
        transform: rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: rotate(-90deg);
        opacity: 0;
    }
}

@keyframes rotateIn {
    0% {
        transform: rotate(90deg);
        opacity: 0;
    }
    100% {
        transform: rotate(0deg);
        opacity: 1;
    }
}

.rotate-out {
    animation-name: rotateOut;
    animation-duration: 0.5s;
    animation-timing-function: ease-in-out;
    animation-fill-mode: forwards; /* Ensures the element stays rotated */
}

.rotate-in {
    animation-name: rotateIn;
    animation-duration: 0.5s;
    animation-timing-function: ease-in-out;
    animation-fill-mode: forwards; /* Ensures the element stays rotated */
}

Hi!

It seems you are already familiar with the CSS!

We don’t support the @keyframe, animation, transform properties from USS but we do support transitions, translate, rotation, scale.

We try to follow the standard as much as we can, but sometime we do diverge from the spec.

Here are two links that could be handy and don’t hesitate to ask any follow up question!