Background image part 2

The background-image Property



Background-image can be set not only for the whole page, but for individual elements, as well. 
Below we set a background image for the <p> element. 

The HTML:<p>This paragraph has a background image.</p>
The CSS:
p {
padding: 30px;
background-image: url("green_photo.jpg");
color: white;
}
Try It Yourself

Result:
To specify more than one image, just separate the URLs with commas.

Comments

Popular posts from this blog

font-family part 1

Styling the list part 3