background

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

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

Plural: backgrounds

position

## English[pəˈzɪʃn] US[pəˈzɪʃən]

n. Position, direction; status, position; attitude; State

vt. Place; put... in the appropriate position; position...; station the army

Third person singular: positions Plural: positions Present participle: positioning Past tense: positioned Past participle: positioned

javascript backgroundPosition attribute syntax

Function:Set the position of the background image.

Syntax:Object.style.backgroundPosition=position

Parameters:x% y%, the first value is the horizontal position , the second value is the vertical position. The upper left corner is 0% 0%. The lower right corner is 100% 100%. If you specify only one value, the other value will be 50%. Pixel unit controls are also available.

javascript backgroundPosition attribute example

    

Run instance »

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