Re: [css3-background] A property to control background opacity

On Mon Dec 23 2013 at 11:38:37 PM, Simon Fraser <smfr@me.com> wrote:

> An alternative to this would be to have an image function that gives an
> image alpha, e.g.:
>
> background-image: alpha-image(foo.png, 50%);
>
> This would seem preferable to a property that can only apply alpha to
> background images.
>

This already exists, in the form of cross-fade().  The default value of the
second argument is "transparent", so "cross-fade(url(foo.png) 50%)" will
give you a half-transparent image.

~TJ

Received on Thursday, 26 December 2013 22:40:16 UTC