HTML / CSS / JS here: http://jsfiddle.net/_mtr/XGe8d/2/
My problem is that the animation happens at the bottom of the element, not the top. I believe this is a problem with my CSS positioning, but I can't judge it. And ideas?
here is another solution
http://jsfiddle.net/moeishaa/s26wr/
Try
$(document).ready(function() { $("a").hover( function() { $(this).animate({ 'paddingTop': '+=10px' }), $(this).animate({ 'paddingTop': '-=10px' }); }); });
If I understand what you are trying to achieve, one option is to animate the padding-top instead of height .
padding-top
height
I updated your jsFiddle . I added a position: relative to your css and used top (). I also added .stop (true, true) to fix the queue problems.
Source: https://habr.com/ru/post/1346767/More articles:Android bitmap size and size - androidWhat is the best way to debug Adobe Flex CSS? - debuggingASP.NET Web Pages Not Responding to File Uploads - asp.netVNC custom client for iPad / iPhone? - ios4Can I have multiple src attributes in an HTML5 element ? Or the src attribute and the element? - html5In Rapidminer, as soon as I import a dataset, how do I change the column type? - rapidminerjarsigner validation using only trusted certificates? - jarsignerRemoving all children from an element works when using getLastChild (), but throws a NullPointerException when using getFirstChild () - domIs it possible to “see” a C # foreach loop in an iterative collection during debugging? - debuggingMoving a method from one file to another while saving its history - version-controlAll Articles