When the jQuery bounce effect is applied to a div with box-sizing: border-box and some padding, it appears to shrink by its padding size during the animation. Check out an example here.
HTML
<div class="example">
This is an example div for bouncing!
</div>
CSS
.example {
box-sizing: border-box;
min-height: 100px;
width: 250px;
background-color: #435ff3;
text-align: center;
cursor: pointer;
padding: 50px;
}
JavaScript
$('.example').click(function() {
$(this).effect('bounce', { distance : 10, times: 2 }, 'slow');
});
Does anyone have an explanation for this interesting behavior?