I was fishing the other day, and a comment told me to go to my home page, mouse over the picture;
(The head is turning around, first reaction WC!! Turn of good fast JS write! However emMM, Css big brother hello ‘^-^’)
1. Browser devtool console use ** need to grab the nuggets head hover animation **
2. CSS code implements rotation
Digging gold implementation code
.avatar:hover { transform: rotate(666turn); transition-delay: 1s; transition-property: all; transition-duration: 59s; The transition - the timing - function: cubic - the bezier (. 34, 0. 84, 1); }Copy the code
The final shorthand code
#pic:hover { transform: rotate(666turn); Transition: all 59s cubic- Bezier (.34,0,.84,1) 1s; }Copy the code