Responsive Images Example 3

Example

Resize the viewport.

fallback

HTML

<picture>
    <source media="(min-width: 1600px)" srcset="images/AlleySpringMilllarge.jpg">
    <source media="(min-width: 800px)" srcset="images/AlleySpringMillmedium.jpg">
    <source media="(min-width: 400px)" srcset="images/AlleySpringMillsmall.jpg">
    <img src="images/AlleySpringMillsmall.jpg" alt="fallback">
</picture>

CSS

img {max-width: 100%; 
   height: auto;
}