The Image Element Can Overflow Itself — Here's How

An image can overflow

The Image Element Can Overflow Itself — Here's How

The humble <img> tag is more complex than it seems. Its content (the actual image) can overflow its container (the element) when using object-fit: cover, border-radius, or object-position. The article explores the default overflow: clip, the underused object-fit: none, and demonstrates creative hover effects, 3D transitions, and a screen loader built with a single image element.

An image can overflow… itself!
  1. philipov

    > Here is a demo where you can hover the image to show/hide the overflow:

    Is something supposed to happen when I hover my mouse over the image? Because nothing happens. I'm using Firefox.

More from this day

2026-08-15