W3C home > Mailing lists > Public > www-style@w3.org > October 2004

Re: Multiple background images

From: csant <csant@csant.info>
Date: Thu, 28 Oct 2004 10:45:14 +0200
To: "www-style.w3.org" <www-style@w3.org>
Message-ID: <opsgknxoe6d84skq@csant.info>

> Given the following hypothetical CSS3:
> body { background: url(foo) url(bar); }
> Which background is painted on the bottom, and which is painted on the  
> top?

As Lachlan Hunt pointed out already, a delimiter might be necessary - but  
I would disagree on his choice for "|".

> Should the syntax be like that, or would something else be better?
> body { background: url(foo), url(bar); }

As in the 'content' property, this would rather tell us an alternate  
background image that could be used in case the first option is not  
available or not supported;

> body { background: url(foo) | url(bar); }

this option seems rather to suggest an image *or* the other one - a nice  
idea to allow random background images;

> body { background: url(foo) and url(bar); }

finally, this looks to me like the best option, and it could be expanded  
as Lachlan Hunt suggested:

body { background: url(foo) top left no-repeat fixed and
                    url(bar) top right repeat-y scroll; }

Might this be a way that could be used in a future audio module to allow  
for playlists on background sounds (play-during) as well?

body { background-sound: url(foo) and url(bar) }

as opposed to

body { background-sound: url(foo), url(bar) }

to allow for alternate audio formats: playing the first supported one?

Regards,
/csant

-- 
[Quote]
And she, remembering other things, to me trifles but torturing to her,  
showed me how life withers when there are things we cannot share.
~~~ Virginia Woolf
Received on Thursday, 28 October 2004 08:45:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:34 GMT