Consider this simple, clean and elegant example using minimal markup:

HTML
<a href="#" class="zoom"> <span></span> <img src="/path/to/image.jpg" /> </a>
CSS
.zoom { border: 5px solid #000; display: inline-block; position: relative; } .zoom span { background: url(http://i.imgur.com/T7yFo.png) no-repeat; bottom: 0; display: block; height: 20px; position: absolute; right: 0; width: 20px; } img { height: auto; max-width: 100%; }
If you prefer to show only a magnifying glass on :hover , change the CSS to display:
.zoom span { ... display: none; ... } .zoom:hover span { display: block; right: center; top: center; }
This will put the zoom image in the middle of the image on :hover .
As an added bonus, you can change the mouse cursor to a custom image (for example, a magnifying glass), additionally prompting the user to enlarge the image.
.zoom img:hover { cursor: url(http://i.imgur.com/T7yFo.png), -moz-zoom-in; }
source share