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 8542455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:04:32+00:00 2026-06-11T12:04:32+00:00

I have this issue with getting an animation working only if the user hovers

  • 0

I have this issue with getting an animation working only if the user hovers over a div.
I made a jsfiddle: http://jsfiddle.net/HBfLY/1/

So I want it to bounce in from the left, but instead it is blinking. What I am doing wrong?

  • 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-11T12:04:33+00:00Added an answer on June 11, 2026 at 12:04 pm

    The problem you’re experiencing is that, once the element changes its position due to the animation, it’s no longer hovered-over by the cursor, therefore the :hover selector no longer applies.

    To remedy this you could apply the :hover to an ancestor element:

    body:hover #animatie1 {
        border: 5px solid black;
        position:relative;
        top: 20px;
        left:100px;
        width:100px;
        height: 200px;
        animation:mymove 2s ;
        -moz-animation:mymove 2s ; /* Firefox */
        -webkit-animation:mymove 2s ; /* Safari and Chrome */
        -o-animation:mymove 2s ; /* Opera */
    }
    

    JS Fiddle demo.

    Or use a preceding sibling element:

    #immediatelyPrecedingSibling:hover + #animatie1 {
        border: 5px solid black;
        position:relative;
        top: 20px;
        left:100px;
        width:100px;
        height: 200px;
        animation:mymove 2s ;
        -moz-animation:mymove 2s ; /* Firefox */
        -webkit-animation:mymove 2s ; /* Safari and Chrome */
        -o-animation:mymove 2s ; /* Opera */
    }
    

    JS Fiddle demo.

    In those browsers that support the general-sibling combinator, you could use any preceding sibling element (so long as you can target it with CSS, and, to reiterate, that this sibling precedes the element to be targeted in the DOM):

    #notAnImmediatelyPrecedingSibling:hover ~ #animatie1 {
        border: 5px solid black;
        position:relative;
        top: 20px;
        left:100px;
        width:100px;
        height: 200px;
        animation:mymove 2s ;
        -moz-animation:mymove 2s ; /* Firefox */
        -webkit-animation:mymove 2s ; /* Safari and Chrome */
        -o-animation:mymove 2s ; /* Opera */
    }
    

    JS Fiddle demo.

    References:

    • Browser support for general sibling ~ combinator.
    • CSS Level 3 Selectors.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Source code at: http://jsfiddle.net/lski/4aTm5/ I have succeeded in getting the above code in Firefox,
I'm having an issue getting a LINQ query to work. I have this XML:
A common issue I have is getting confused what $(this) is referring to. I
I have this issue, I'm have a user selected in LDAP through ldap search,
I'm running some migrations on Heroku and I'm getting this issue. I have this
I have a minor issue getting my user agent detection to work. Whenever i
Im having issues getting this to work, maybe its not even possible? I have
I have this issue trying to get all the text nodes in an HTML
I have this issue: first, I execute a SQL query using Java and then
I have this issue with ComboBox that uses IEnumerable<Brush> as ItemsSource; the problem lies

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.