W3C home > Mailing lists > Public > www-style@w3.org > December 2013

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 26 Dec 2013 22:39:48 +0000
Message-ID: <4066822823151543449@gmail297201516>
To: smfr@me.com, cabanier@gmail.com, david.email@ymail.com, www-style@w3.org
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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:17 UTC