'Pseudo element (::before) is hover out animation keep going
I nee help on something very specific (i guess)
I have "li" block with ::before pseudo element
<li id="phone">XX XX XX XX XX</li>
li::before
display: block
content: ""
width: 17px
height: 17px
margin-right: 8px
position: relative
align-items: center
background: blue
So i animate the pseudo block when the "li" is hover like so :
li:hover::before
animation-name: hover-wriggle
animation-duration: 2s
animation-fill-mode: forwards
animation-direction: alternate-reverse
animation-iteration-count: infinite
animation-timing-function: ease-in-out
@keyframes hover-wriggle
0%
transform: rotate(50deg)
50%
transform: rotate(-50deg)
100%
transform: rotate(0deg)
When i hover the "li" he move, when i quit i want them to keep doing animation for like 1sec ? This is possible (without JS !) ?
Thanks ! Happy Coding <3
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
