- From: Edward O'Connor <eoconnor@apple.com>
- Date: Thu, 05 Jan 2012 12:09:20 -0800
- To: www-style@w3.org
Tab wrote:
> If the only use-case is replacing broken <img> tags with a fallback,
> then, this can be done with a rule like:
>
> img { content: image(attr(src as url), "fallback.png"); }
>
> or, to simply hide broken images:
>
> img { content: image(attr(src as url), transparent); }
[...]
> Are there use-cases for anything further?
Consider a layout in which images have a shadow.
img {
box-shadow: 4px 4px #999;
}
It'd be nice to be able to turn off the shadow if the image hasn't
loaded yet or couldn't be loaded.
img:something {
box-shadow: none;
}
Ted
Received on Thursday, 5 January 2012 21:12:49 UTC