Bouncing divisions in place?

I am trying to create a simple bouncing effect for my divs. The bouncing effect works in some way, but I don’t understand why divs fall under each other when they bounce, which is not what I want. I need divas to bounce in place.

This is FIDDLE

And this is my code:

$(document).ready(function() {
    $(".balls").effect('bounce', { times: 3 }, 'slow');
});

The bounce effect is triggered when the page loads. Any help would be appreciated.

+4
source share
4 answers

, div .balls, display: block, . , , . , CSS:

.ui-effects-wrapper {
    display: inline-block;
}

+4

    float:left;

    display:inline-block;

+1

display:inline

divs, , fiddle

+1

, div div, .ui-effects-wrapper inline float none div. css top css. css:

.ui-effects-wrapper{float:left!important;}
+1

Source: https://habr.com/ru/post/1626321/


All Articles