Make an Image Hover with JavaScript, HTML, and CSS

A quick way to add style to your web design.

All we’re going to do is bounce our image back-and-forth, left and right, up and down to create this effect.

We’ll start by capturing the image through the DOM and finding its center.