Zoom
cursor: zoom-in in CSS: the magnifier with a plus
zoom-in is the magnifying glass with a plus. It says 'click and this gets bigger'.
cursor: zoom-in; Move your mouse over this box Cursors only appear with a mouse or trackpad. Open this page on a computer to see this one. What it shows
A magnifier with a plus sign. Windows has no system role for it, so Chrome, Edge and Firefox draw their own. On macOS 15 and later Chrome uses the system zoom-in cursor; before that it uses its own image.
Usage
When to use it
Use it for
- Thumbnails that open a larger view or a lightbox.
- Product photos with click-to-zoom.
- Charts and diagrams where a click zooms into the area under the pointer.
Avoid it for
- Links that go to another page, even if the page shows a bigger image. Keep the hand.
- Images that do nothing when clicked, just because they are photos.
Code
Copy the snippet
.zoomable { cursor: zoom-in; }
.zoomable.is-open { cursor: zoom-out; } <div class="zoomable" role="img" aria-label="Product photo">Product photo</div> Support
Browsers and systems
| Browser | Support |
|---|---|
| Chrome | 37 |
| Edge | 12 |
| Firefox | 24 |
| Safari | 9 |
| Safari on iOS | no |
| Chrome on Android | 37 |
| System | Matching cursor |
|---|---|
| Windows role | none (browser-supplied) |
| Windows file | none |
| macOS | Zoom in (macOS 15+) |
Watch out
Gotchas
- Switch to zoom-out on the enlarged image so people know a second click shrinks it again.
- Windows has no zoom cursor role, so a Windows cursor scheme cannot restyle it.
- The lightbox needs keyboard support too: Enter to open, Escape to close.
FAQ
Questions
- Do I still need -webkit-zoom-in?
- Only for very old browsers: Chrome before 37, Safari before 9. Firefox before 24 used -moz-zoom-in. Current browsers accept plain zoom-in.
- Should a lightbox thumbnail use zoom-in or pointer?
- zoom-in, if clicking makes the image bigger on the same page. It tells people what will happen, which pointer does not.
- Does zoom-in zoom the page?
- No. It only changes the cursor. Your code does the zooming.
More