Responsive images without JavaScript
bjorn.wikkeling.com
Responsive images without JavaScript
1–6 of 6 posts
Re: Responsive images without JavaScript
#2If you're using Twitter Boostrap 3, there's a new CSS class to make images responsive called 'img-responsive'
Re: Responsive images without JavaScript
#3Not that big of a deal, but it means when you right-click to open the image in a new tab or save, it gives you the lo-res image (the src of the opacity 0 img tag since background images don't have this browser ability). Not sure it matters too much.
Re: Responsive images without JavaScript
#4One IE annoyance that might apply here (if you even care about IE, and have lots of images on one page) is that only 31 style sheets can be applied at once.
http://blogs.telerik.com/aspnetmvcteam/posts/10-05-03/intern... (includes test page)
Re: Responsive images without JavaScript
#5Not that big of a deal, but it means when you right-click to open the image in a new tab or save, it gives you the lo-res image (the src of the opacity 0 img tag since background images don't have this browser ability). Not sure it matters too much.
Good point, didn't think of that. I am also not sure how important that is.
Re: Responsive images without JavaScript
#6One IE annoyance that might apply here (if you even care about IE, and have lots of images on one page) is that only 31 style sheets can be applied at once. http://blogs.telerik.com/aspnetmvcteam/posts/10-05-03/intern... (includes test page)
I thought that, that maximum of 31 stylesheets is only for external stylesheets, the styles in this code are written inline, that should work just fine I think, but I can do some tests to make sure.