3 ms·
Another option would be to allow the source to be specified in css (stylesheets are loaded before images anyway). Then you could do <img id="cats" src="fal
by ollysb 12y ago
Another option would be to allow the source to be specified in css (stylesheets are loaded before images anyway). Then you could do
<img id="cats" src="fallback_for_old_browser.png" />
@media (max-width: 600px) {
#cats {
src: url('http://cats.com/cats-600.png');
}
}
- kaoD 12y agoNo please. CSS is meant for presentation, not content.
- swift 12y agoWe'll need a solution in CSS for properties like background-image and border-image. (Indeed, there have been multiple proposed solutions already.) It would be nice to use the same mechanism for both CSS and content images instead of introducing yet another case in the web platform where we have multiple slightly-incompatible mechanisms that do the same thing.