Why twitching animation? When you hover the cursor, then remove, wait until the animation returns to its initial position and sharply hover the cursor again, the animation begins, as it were, not from the beginning. This does not always work, because you have to direct 50 times)) Why is this happening and how to fix it?
This will be the icon of the menu-burger folding (for example in the cross) when hovering. I know that the problem is easily solved on jquery, but I would like to find out why this is happening.
HTML
<div class="container"> <div class="line"></div> </div> CSS
.container{ width:100px; height:100px; background-color:grey; margin:80px; } .line{ width:100%; height:8px; background-color:black; transition: 1s linear; } .container:hover .line{ transition: 1s linear; transform:rotate(90deg); } here is an example of https://jsfiddle.net/vm12aa1w/
here I asked a question, but I did not find a solution; in the comments to the first answer, the person posted a video (special thanks to him) in which you can see how the animation abruptly jumps off to the beginning https://otvet.mail.ru/question/183027834