The background-position property in CSS allows you to move a background image (or gradient) around within its container.

html {
  background-position: 100px 5px; 

It has three different types of values:

  • Length values (e.g. 100px 5px)
  • Percentages (e.g. 100%
Avatar of Chris Coyier
Chris Coyier on (Updated on )


The background property in CSS allows you to control the background of any element (what paints underneath the content in that element). It is a shorthand property, which means that it allows you to write what would be multiple CSS …

Avatar of Sara Cope
Sara Cope on (Updated on )