- From: Lachlan Hunt <lachlan.hunt@iinet.net.au>
- Date: Thu, 18 Dec 2003 22:03:07 +1100
- To: Chris Moschini <cmoschini@myrealbox.com>
- Cc: www-style@w3.org
Chris Moschini wrote: > Although this does accomplish the rounded corners example, I can > certainly imagine situations where multiple backgrounds on one > element could be quite useful. > > Take the now-classic CSS Zen Garden, using its standard style: > http://csszengarden.com/ > > Note that, at the top-left of the page is a lillipad image that does > occupy some of the space outside the content, but also some inside > the content. At the bottom-left is a blossom tree with the same > inside/outside characteristics. > > In this case, the effect is only possible because there are 2 layers > to apply backgrounds to - the body tag and a second div tag occupying > the same area. If a design backing 4 corners was desired, 3 extra > tags would be needed. And if you wanted something in the center as > well... . > > Ideally, this stacking of background images in a design that can be > any width or height could be handled in one CSS definition, instead > of modifying (and cluttering) the *ML for each layer of decoration. I just found out that adding multple backgrounds for one element has already been experemented with. Take a look at this site that uses the ::before and ::after pseudo classes to do it. http://www.literarymoose.info/=/synopsis/multimoose.xhtml
Received on Thursday, 18 December 2003 06:06:47 UTC