background-image: url(***);
Browser |
|
---|
The background-image property specifies the background image of an element.
div {
background-image: url(image/back.gif);
}
Property | Value | Explanation |
---|---|---|
background-image | url(URL) | the URL of the image to display |
The default is "none".
Example
<html>
<head>
<title>TAG index</title>
<style type="text/css">
div {
width: 70%;
height: 200px;
background-color: #ffffff;
background-image: url(image/back.gif);
color: red;
}
</style>
</head>
<body>
<div>The background image example</div>
</body>
</html>
- Output
-
The background image example
back.gif