Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8906119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:34:08+00:00 2026-06-15T02:34:08+00:00

I want to animate two (or more) CSS transform properties separately using keyframe animation

  • 0

I want to animate two (or more) CSS transform properties separately using keyframe animation like this:

@keyframes translatex {
    100% {
        transform: translateX(100px);
    }
}
@keyframes rotatez {
    100% {
        transform: rotateZ(80deg);
    }
}

HTML:

<div class="rect"></div>

The translatex animation should start with a 0s delay and last for 5 seconds. The rotatez animation should start with a 1s delay and last for 3 seconds. The .rect element starts moving, then after 1 second it starts rotating, then after 3 seconds it stops rotating and after 1 more second it finishes its movement.

Apply animation:

.rect {
    animation-name: translatex, rotatez;
    animation-duration: 5s, 3s;
    animation-timing-function: ease, ease-in-out;
    animation-delay: 0s, 1s;
    animation-direction: forward, forward;
}

The problem is that only the rotatez animation is applied.

Are there ways to implement the animation using only CSS, such as keyframe animation or transitions, or do I need JavaScript and requestAnimationFrame?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T02:34:09+00:00Added an answer on June 15, 2026 at 2:34 am

    Yes, it is possible. Instead of calling two animation-names, create only one animation with both actions inside:

    @keyframes translateXandZ {
        100% {
            transform: translateX(100px) rotateZ(80deg);
        }
    }
    

    Look at Google’s "Animate your HTML5" presentation.

    Here is a workaround, even though it is a bit of a coarse version:

    @-webkit-keyframes translateXandZ {
        0% {-webkit-transform: translateX(0px) rotateZ(0deg);}
        2% {-webkit-transform: translateX(1px) rotateZ(0deg);}
        5% {-webkit-transform: translateX(3px) rotateZ(0deg);}
        20% {-webkit-transform: translateX(20px) rotateZ(0deg);}
        80% {-webkit-transform: translateX(80px) rotateZ(80deg);}
        95% {-webkit-transform: translateX(97px) rotateZ(80deg);}
        98% {-webkit-transform: translateX(99px) rotateZ(80deg);}
        100% {-webkit-transform: translateX(100px) rotateZ(80deg);}
    }
    

    Your animation is linear, but to make it ease-in-out, I played with the beginning and ending of the animation. It’s still not perfect, but this is the only way I see how you could get what you want.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to Animate two Different layouts. Example I already have the animation the
i want to animate my two window using NSWindowFlipper i get the code from
I want to animate two jquery OBJECTS at the same time (using the jquery
Will this work? The reason I ask is because I want to animate two
i want to animate tableviewcell background image with two blinking images on didSelectRowAtIndexPath. We
I have a few divs that I want to animate using jQuery. However, I
I want to use .animate to change colors when .bind('click') is fired, using jquery
I have two divs which I want to animate: <div id="character"> <div id="sprite"></div> </div>
I want to animate motion of a number of squares. In this example i
I have two images and i want to animate these on click of a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.