Rotate In Up Right Animation Effect with CSS

The CSS rotateInUpRight animation creates a rotation effect where an element rotates in from an upward-right position. The element starts at -90 degrees rotation and gradually rotates to 0 degrees while fading in from transparent to fully visible.

Syntax

@keyframes rotateInUpRight {
    0% {
        transform-origin: right bottom;
        transform: rotate(-90deg);
        opacity: 0;
    }
    100% {
        transform-origin: right bottom;
        transform: rotate(0);
        opacity: 1;
    }
}

.element {
    animation-name: rotateInUpRight;
    animation-duration: time;
}

Example

The following example demonstrates the rotateInUpRight animation effect −

<!DOCTYPE html>
<html>
<head>
<style>
    .animated-box {
        width: 150px;
        height: 150px;
        background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
        margin: 50px auto;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-weight: bold;
        animation: rotateInUpRight 2s ease-in-out;
    }

    @keyframes rotateInUpRight {
        0% {
            transform-origin: right bottom;
            transform: rotate(-90deg);
            opacity: 0;
        }
        100% {
            transform-origin: right bottom;
            transform: rotate(0);
            opacity: 1;
        }
    }

    .restart-btn {
        display: block;
        margin: 20px auto;
        padding: 10px 20px;
        background-color: #007bff;
        color: white;
        border: none;
        border-radius: 5px;
        cursor: pointer;
    }
</style>
</head>
<body>
    <div class="animated-box">Rotate In</div>
    <button class="restart-btn" onclick="location.reload()">Restart Animation</button>
</body>
</html>
A colorful gradient box appears by rotating in from -90 degrees to 0 degrees while fading in. The box rotates around its bottom-right corner, creating an upward-right rotation effect. A blue button below allows restarting the animation.

Key Properties

Property Value Description
transform-origin right bottom Sets rotation pivot point to bottom-right corner
transform rotate(-90deg) to rotate(0) Rotates element from -90° to 0°
opacity 0 to 1 Fades element in from transparent to opaque

Conclusion

The rotateInUpRight animation combines rotation and opacity transitions to create an engaging entrance effect. The transform-origin property ensures the rotation occurs around the bottom-right corner for the characteristic upward-right motion.

Updated on: 2026-03-15T11:55:54+05:30

139 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements