Skip to content

Instantly share code, notes, and snippets.

@AlanSimpsonMe
Created July 29, 2017 14:28
Show Gist options
  • Save AlanSimpsonMe/8aa4c13c937a0c1588a99d00fe69070d to your computer and use it in GitHub Desktop.
Save AlanSimpsonMe/8aa4c13c937a0c1588a99d00fe69070d to your computer and use it in GitHub Desktop.
CSS code to make image under mouse pointer go crazy,
/* Put class="crazy" in an img to to which you want to apply this CSS */
img.crazy {
display: block;
margin: 10em auto;
/* That code is really just the opposite of the hover code. */
transform: scale(1) rotate(720deg);
/* How long transitions take */
transition: all 1s;
}
/* Style applied when mouse pointer hovering */
img.crazy:hover {
transform: scale(0.1) rotate(-720deg);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment