# The Image Element Can Overflow Itself — Here's How

Original title: An image can overflow

> Hacker News story 49261421 · language: en · submitted 2026-08-11
> Web version: https://zeli.app/story/49261421
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 59 · by [ibobev](<https://news.ycombinator.com/user?id=ibobev>) · 💬 20
[original](<https://master.dev/blog/something-nobody-told-you-about-the-image-element-it-can-overflow/>) · [HN discussion](<https://news.ycombinator.com/item?id=49261421>)

## Summary

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.

## Key quote

> An image can overflow… itself!

## HN discussion (20 comments)

### [philipov](<https://news.ycombinator.com/item?id=49315028>)

> \> 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.

---

## Cite

- Page: https://zeli.app/story/49261421
- Date: 2026-08-11
- Source: master.dev (https://master.dev/blog/something-nobody-told-you-about-the-image-element-it-can-overflow/)
- Hacker News: https://news.ycombinator.com/item?id=49261421

## Other languages

- zh: https://zeli.app/zh/story/49261421 · markdown: https://zeli.app/zh/story/49261421.md
- de: https://zeli.app/de/story/49261421 · markdown: https://zeli.app/de/story/49261421.md
- es: https://zeli.app/es/story/49261421 · markdown: https://zeli.app/es/story/49261421.md
