A very simple CSS background zoom

A really easy method of creating a CSS background image zoom. Not only is this simple, it comes with wide browser support.
Share  

Example

See the Pen A very simple CSS background zoom by Tipue () on CodePen.

The HTML

There's two divs.
HTML

The CSS

There's an outer div that sets the height and/or width of the background. There has to be a set value for either height or width. The overflow value hides anything outside the bounds of the outer div, which is how it works.
CSS
The inner div hover has a transform value that zooms in by 20%.

Browser support

Browsers that support transform and everthing above include Chrome 49+, IE11+, Edge 16+, Firefox 57+, Safari 11+, iOS Safari 10.2+ and Chrome for Android 64+.
Share  

Read more on Tipue