The element is arbitrarily placed on the page and should go to a fixed position in the event (scrolling the screen in my case, but im using hovering in the fiddle)
The initial position of the element is centered with the parent (top: automatic and left: automatic). When hovering, it should smoothly move to the corner of the screen (left: 0, top: 0), and then return. Instead, he simply jumps into place, ignoring the transition property.
I understand that none of the browsers supports the transition to auto, but I hoped to find some work for this.
fiddle
<div> <span>test</span> </div> div { border: 1px solid red; text-align: center; height: 100px; margin: 15px; } span { display: inline-block; width: 50px; height: 50px; background: blue; transition: all 1s; position: fixed; left: auto; top: auto; } div:hover span { left: 0; top: 0; }
PS. I hope to fix the css, but a solution with jQuery will work.
source share