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

  • Home
  • SEARCH
  • 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 3807132
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T14:56:34+00:00 2026-05-19T14:56:34+00:00

I have two elements on a page that I’d like to animate via CSS

  • 0

I have two elements on a page that I’d like to animate via CSS (specifically, -webkit-animation). The animation itself simply bounces an element up and down. One element is always shown and bouncing, the other is not animated until mouse-over (hover).

My question is: Is it possible to sync (have both elements reach their apex at the same time, etc) the animation across both elements regardless of when the 2nd element’s animation is started?

Here’s my HTML:

<div id="bouncy01">Drip</div>
<div id="bouncy02">droP</div>

and my CSS:

@-webkit-keyframes bounce {
    0% {-webkit-transform: translateY(0px);}
    25% {-webkit-transform: translateY(-2px);}
    50% {-webkit-transform: translateY(-4px);}
    75% {-webkit-transform: translateY(-2px);}
    100% {-webkit-transform: translateY(0px);}
}
#bouncy01,
#bouncy02 {
    margin:10px;
    float: left;
    background: #ff0000;
    padding: 10px;
    border: 1px solid #777;
}
#bouncy01 {
    -webkit-animation:bounce 0.25s ease-in-out infinite alternate;
}
#bouncy02 {
    background: #ffff00;
}
#bouncy02:hover {
    -webkit-animation:bounce 0.25s ease-in-out infinite alternate;
}

and finally, a working demo of the issue: http://jsfiddle.net/7ZLmq/2/

(to see the problem, mouse-over the yellow block)

  • 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-05-19T14:56:34+00:00Added an answer on May 19, 2026 at 2:56 pm

    I don’t think its possible natively, but you can actually hack similar functionality by using a bouncing wrapper and some position altering

    html:

    <div id="bouncywrap">
        <div id="bouncy01">Drip</div>
        <div id="bouncy02">droP</div>
    <div>
    

    CSS:

    @-webkit-keyframes bounce {
        0% { padding-top:1px;}
    /* using padding as it does not affect position:relative of sublinks
     * using 0 instead of 0 b/c of a box-model issue,
     * on kids wiht margin, but parents without margin, just try out
     */
        50% { padding-top:5px;} /*desired value +1*/
        100% { padding-top:1px;}
    }
    
    #bouncy01,
    #bouncy02 {
        margin:10px;
        background: #ff0000;
        padding: 10px;
        border: 1px solid #777;
        width:30px;
           position:absolute;
    }
    #bouncywrap {
        -webkit-animation:bounce 0.125s ease-in-out infinite;
        position:relative;
        width:140px;
        height:50px;
    /*    background:grey; /*debug*/
    }
    #bouncy02 {
        background: #ffff00;
        left:60px;
        top:2px; /*half of desired value, just a fix for the optic*/
    }
    #bouncy02:hover {
        position:relative; /*here happens the magic*/
        top:0px;
    }
    

    demo http://jsfiddle.net/A92pU/1/

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

Sidebar

Related Questions

I have two span elements that I would like to stay on the same
I have two elements on the same page that are using the same stylesheet:
I have two form elements on my page that act as a smooth login
I have a HTML page that contains two main elements. One is a silverlight
We have a page that ordinarily has two elements arranged side-by-side. Despite exploring a
I have an ASP.NET page that has two input elements: A TextBox that is
I have two elements (a field and some text) that I would like to
I have a very basic page with two elements, an outer green box, and
For example, I have two elements in an enum. I would like the first
I have two div elements that are twins (i.e. their dimensions and contents are

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.