css div as background image code example
Example 1: div background image
#avatar {
background-image: url('http://i.stack.imgur.com/Dj7eP.jpg');
width: 150px;
height: 150px;
background-size: cover;
background-position: top center;
border-radius: 50%;
}
Example 2: add background image in css
.w {
background-image: url("images/tom1.png");
}
.a {
background-image: url("images/tom2.png");
}
.s {
background-image: url("images/tom3.png");
}
Example 3: how to set div background image
body {
background-image: url("paper.gif");
background-color: #cccccc;
}