After applying a transition to the header using the hover pseudo-class, I noticed that it abruptly snaps back to its original position when the hover effect is removed. Is there a way to smoothly return the header to its original position using the same cubic-bezier transition function in 0.5 seconds? Are there any specific pseudo-classes for handling hover-out events, or should I resort to using jQuery?
header{
background:#000;
padding:50px ;
-webkit-transition: 0s padding-bottom;
}
header:hover{
padding-bottom:90px;
-webkit-transition-duration: 0.5s;
-webkit-transition-timing-function: cubic-bezier(0.175,0.885,0.320,1.275);
}
<header>
</header>