HTML5, CSS3, and JavaScript Fourth Edition

(Ben Green) #1

CHAPTER 31. BACKGROUNDS 276


body { background-image: url(a.png), url(b.png), url(c.png); }


The first image will be displayed on top. The second will be displayed
beneath it. If the first has some parts that are transparent, then the second
will show through in those places. The bottom layer should not have any
transparency.


By default the background repeats both x (horizontally) and y (vertically).
If you use different image sizes, the resulting background can appear to be
non-repeating.

Free download pdf