UK [ˈbækɡraund ˈimidʒ] US [ˈbækˌɡraʊnd ˈɪmɪdʒ]

Background image

javascript backgroundImage property syntax

Function:Set the background image of the element.

Syntax:Object.style.backgroundImage=url(URL)|none

Parameters:url(URL) Path to the image . none No background image.

Note:Please set an available background color, so that if the background image is not available, the page can also get good visual effects.

javascript backgroundImage property example

   

Run instance »

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