W3C home > Mailing lists > Public > www-style@w3.org > May 2010

Re: [css3-background] background-size and zero length

From: Alan Gresley <alan@css-class.com>
Date: Thu, 13 May 2010 02:14:37 +1000
Message-ID: <4BEAD3ED.4060602@css-class.com>
To: Brian Manthos <brianman@microsoft.com>
CC: Sylvain Galineau <sylvaing@microsoft.com>, Boris Zbarsky <bzbarsky@MIT.EDU>, "www-style@w3.org" <www-style@w3.org>
Brian Manthos wrote:
[snip]
> div {
> 	background: url(http://www.microsoft.com/favicon.ico) / 0.00833333330px 100px aqua;
> 	/* Cover IE with Microsoft wallpaper; hide it in Firefox. */
> 	background-size: 100px 100px;
> 	height: 100px;
> 	width: 100px;
> }

IE will be locked out anyway without any strange hack.


background: url(legacy.png) top left; /* for legacy browser */
background: url(resized.png) top left / 100% 100% no-repeat;


> Note that this example doesn't apply directly today because neither Opera nor Firefox appear to support background-size values in the background shorthand no matter what I attempt to throw at them.


These browsers need the engine prefix.


-webkit-background-size: 20% 100%;
-khtml-background-size:20% 100%;
-moz-background-size:20% 100%;
-o-background-size:20% 100%;



-- 
Alan http://css-class.com/

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo
Received on Wednesday, 12 May 2010 16:15:14 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:27 GMT