property
background-position — CSS reference
Places each image relative to its positioning area. Initial 0% 0%, not inherited. A percentage is applied to the difference between area size and image size, not simply to the area. For a 100px area and 20px image, 50% offsets the image by 40px.
Formal Syntax & Structure
css syntaxcss
<bg-position>#Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS image painting lab</title><style>body {margin:0} .sample {background:#dcebe9;color:#182e32}body{background:white} #a{width:100px;height:80px;background-color:blue}#a{background-image:linear-gradient(red,red);background-size:20px 20px;background-repeat:no-repeat;background-position:50% 50%}</style><body><div id="a" aria-hidden="true"></div><p>Decorative background sample.</p></body></html>