I am trying to create a page background with an overlay using css3's multiple background support;
html, body { background: url('https://github.com/jaysalvat/vegas/raw/master/overlays/01.png') repeat, url('http://farm8.staticflickr.com/7260/7502004958_595bf03fbf_z.jpg') top left no-repeat; background-size: cover; }
I want the photo background image to "cover" the page and the overlay to be small (3*3px) repeating over the hole page.
The above example gives me http://jsfiddle.net/tpmD4/ (also the overlay covering the page).
How can I fix that?
When I try to specify the background-size for both of the images (background-size: 3px 3px, cover;
); then the image background doesn't cover, but the overlay works.
CSS allows you to add multiple background images for an element, through the background-image property. The different background images are separated by commas, and the images are stacked on top of each other, where the first image is closest to the viewer.
Android is well known for the different ways to tweak and customize home screens. And you can have a different wallpaper for each one using GO Multiple Wallpaper. The Android OS is known for the different ways one can customize home screens, add widgets and tweak any visual component of the UI.
The background-size property specifies the size of the background image. Before CSS3, the background image size was determined by the actual size of the image. In CSS3 it is possible to specify the size of the background image, which allows us to re-use background images in different contexts.
background-image: url(), url(), …; This property is used to set one or more background images to the element, separated by commas. background-position: right bottom, left top; This property is used to set the position of different images in the page. It set the initial position for each background image.
Here you go:
html, body { background-image: url(01.png), url(z.jpg); background-repeat: repeat, no-repeat; background-position: 0 0; background-size: 3px 3px, cover; }
http://jsfiddle.net/tpmD4/6/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With