Samstag, 26. Juli 2014

Responsive Images: Use Cases and Documented Code Snippets to Get You Started




CSS-Tricks





Responsive Images: Use Cases and Documented Code Snippets to Get You Started



Andreas Bovens put together this epic recipe list for <picture> / <img srcset>. There are four scenarios:



  • Do my image sizes change depending on my responsive design rules?

  • Do I want to optimize for high-dpi screens?

  • Do I want to serve images with different mime types to browsers that support them?

  • Do I want to serve different art depending on certain contextual factors?



Then Andreas shares what the code would look like for all of those plus any combination of them.


Direct Link to ArticlePermalink



Responsive Images: Use Cases and Documented Code Snippets to Get You Started is a post from CSS-Tricks








Keine Kommentare:

Kommentar veröffentlichen