background

The background CSS property is a shorthand for setting the individual background values in a single place in the style sheet. background can be used to set the values for one or more of: background-color, background-image, background-position, background-repeat, background-size, and background-attachment.

Values

One or more of the following, in any order:
<‘background-color’>
<‘background-image’>
<‘background-position’>
<‘background-size’>
<‘background-repeat’>
<‘background-attchment’>
<‘background-clip’>

Example

<!DOCTYPE HTML>
<html>
    <head>
        <title>CSS Tutorials</title>
        <style>
            body {
                background: red;
            } .banner {
                background: url("myImage.jpeg") #00D repeat-y fixed;
            }
        </style>
    </head>
    <body>
        <div class="banner">
            this is banner text
        </div>
    </body>
</html>