CSS Transition Doesn't Work With Top, Bottom, Left, Right


Answer :

Try setting a default value in the css (to let it know where you want it to start out)


CSS


position: relative;
transition: all 2s ease 0s;
top: 0; /* start out at position 0 */


Perhaps you need to specify a top value in your css rule set, so that it will know what value to animate from.



In my case div position was fixed , adding left position was not enough it started working only after adding display block



left:0;
display:block;



Comments

Popular posts from this blog

530 Valid Hostname Is Expected When Setting Up IIS 10 For Multiple Sites

C Perror Example

Converting A String To Int In Groovy