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

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"