html tutorial - How to apply multiple background images to an element using CSS - html5 - html code - html form



Answer: Use the CSS3 background property

    Using CSS3,it perform add or apply multiple backgrounds to an element.The backgrounds are placed like layers, where the primary background specified on the top and last background within the back.The last background will include a background-color.Check out the following example:

    Example

      <!DOCTYPE html>
      <html lang="en">
      <head>
      <meta charset="UTF-8">
      <title>Setting Multiple Backgrounds with CSS3</title>
      <style type="text/css">
          .box {
              width: 100%;
              height: 500px;
              background: url("images/sky.png") no-repeat center,  url("images/map.png")  no-repeat center, url("images/sun.png")  no-repeat 10% 30%, lightblue;
          }
      </style>
      </head>
      <body>
          <div class="box"></div>
      </body>
      </html>

      Related Searches to How to apply multiple background images to an element using CSS