Background image part 1

CSS Fundamentals
Properties
background-image
108
1/2
         

The background-image Property



The background-image property sets one or several background images in an element. Let's set a background-image for the <body> element.

The CSS:
body {
background-image: url("css_logo.png");
background-color: #e9e9e9;
}
Try It Yourself

The url specifies the path to the image file. Both relative and absolute paths are supported.
Result:
By default, a background-image is placed at the top-left corner of an element, and is repeated both vertically and horizontally to cover the entire element.

Comments

Popular posts from this blog

font-family part 1

Styling the list part 3