We would like to know how to set pictures in the div background.
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
#product1left {<!--from ww w . ja v a2s.c o m-->
width: 100px;
height: 100px;
background-color: red;
background-size: 100%;
}
</style>
</head>
<body>
<div id="product1left" class="product-cards-left"
style="background-image: url('http://www.java2s.com/style/download.png')">
</div>
</body>
</html>
The code above is rendered as follows: