I'm sure I read how to do this on Glorious Trainwrecks, but I can't find it now and I can't seem to get the syntax right. I'm using Sugarcane with imported images. Thanks!
If you're willing to forego support for older browsers, you can overlay your image using CSS3 multiple backgrounds (supported browsers). Here's a note on the syntax for that:
Which image is supposed to be the front one? This example lists the background layers from front to back. So unless image1 is smaller or transparent, image2 will be hiding behind it.
Aha! Well, I figured it out. It doesn't work with imported images (or imported images require a different syntax). So my above code fails as described, but this works fine:
body { background-image: url('small.jpg'), url('large.jpg'); background-repeat:no-repeat; background-attachment:fixed; background-position:center center; }
You can use multiple image in modern browsers almost the same way as it works with single background image, you need to use the same background property to specify backgrounds which must be separated by commas, like here: multiple backgrounds using CSS3. The images will overlap each other in the order which you set them (list separated by commas).
Comments
http://css-tricks.com/perfect-full-page-background-image/
If you're willing to forego support for older browsers, you can overlay your image using CSS3 multiple backgrounds (supported browsers). Here's a note on the syntax for that:
http://caniuse.com/#search=multiple backgrounds
body {
background-image: [img[image1]], [img[image2]];
background-repeat:no-repeat;
background-attachment:fixed;
background-position:center center;
}
But I only see the first image specified.
body {
background-image: url('small.jpg'), url('large.jpg');
background-repeat:no-repeat;
background-attachment:fixed;
background-position:center center;
}
.imgBox
{
width: 191px;
height: 191px;
background: url(duck.png) no-repeat;
}
.imgBox:hover {
width: 191px;
height: 191px;
background: url(peng.png) no-repeat;
}
More about overlay...
http://www.corelangs.com/css/box/hover.html
naimer