background

UK[ˈbækgraʊnd] US[ˈbækˌɡraʊnd]

n. (painting, etc.) background; background color; background information; soundtrack

Plural: backgrounds

image

##英[ˈɪmɪdʒ] 美[ˈɪmɪdʒ]

n. Image; portrait; concept, intention; mirror, Image

vt. Reflect; imagine; make an image of; symbolize

Third person singular: images Plural: images Present participle: imaging Past tense: imaged Past participle: imaged

css background-image property syntax

How to use the background-image attribute?

The background-image attribute sets the background image for the element. The syntax is: background-image:url (picture path). The background image you set takes up the full size of the element, including padding and borders, but not margins.

Function: Set the background image for the element.

Note: The background of the element occupies the entire size of the element, including padding and borders, but does not include margins. By default, the background image is placed in the upper left corner of the element and repeats horizontally and vertically.

Note: The attribute value "inherit" is not supported in any version of Internet Explorer (including IE8).

css background-image property example

<html>
<head>

<style type="text/css">
body {background-image:url('http://img.php.cn/upload/article/000/005/656/5af270fd37755429.jpg');}
</style>

</head>

<body></body>

</html>

Run instance »

Click the "Run instance" button to view the online instance