Set more than one image for background : background image « CSS « HTML / CSS






Set more than one image for background

  

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
    <head>
        <title></title>
<style type="text/css">

h2 {
    padding-top: 72px;
    text-align: center;
    Background-image: url(plane.gif), url(mail.gif), url(printer.gif), url(gift.gif);
    Background-position: center, top center, 40% 24px, 60% 24px;
    Background-repeat: no-repeat;
}
</style>
    </head>
    <body>
<h2>header 2</h2>
<h3>header 3</h3>

<p>This is a text.</p>


    </body>
</html>

   
  








Related examples in the same category

1.'background-image' Example
2.background-image: url('backgroundImage.jpg');
3.background-image property
4.background-image:url(http://java2s.com/style/logo.png); background-color:#cccccc;
5.background-image: url(http://java2s.com/style/logo.png);background-repeat: repeat-x; background-color: #ffffff;
6.background image: url
7.Page like background image for whole page
8.Tiled background image
9.Background-image: url(plane.gif), url(mail.gif), url(printer.gif), url(gift.gif); Background-position: center, top center, 40% 24px, 60% 24px;
10.The background-image property uses the url() syntax to specify a background-image.
11.background-image with default repeat properties
12.Use background-image:none to show no background image
13.Set background image for first line text in paragraph
14.Only part of a large background image is visible because the element's height is determined by the length of its contents.
15.Set style for strong to normal font weight and background color to yellow
16.Add background image to LI
17.Adding background images and indentation
18.background-image and background-color