{"id":13963,"date":"2011-08-31T20:00:46","date_gmt":"2011-09-01T03:00:46","guid":{"rendered":"http:\/\/css-tricks.com\/?page_id=13963"},"modified":"2021-05-20T09:26:04","modified_gmt":"2021-05-20T16:26:04","slug":"background","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/properties\/b\/background\/","title":{"rendered":"background"},"content":{"rendered":"\n

The background<\/code> property in CSS allows you to control the background of any element (what paints underneath the content in that element). It is a shorthand<\/em> property, which means that it allows you to write what would be multiple CSS properties in one. Like this:<\/p>\n\n\n\n

body {\n  background:\n     url(sweettexture.jpg)    \/* image *\/\n     top center \/ 200px 200px \/* position \/ size *\/\n     no-repeat                \/* repeat *\/\n     fixed                    \/* attachment *\/\n     padding-box              \/* origin *\/\n     content-box              \/* clip *\/\n     red;                     \/* color *\/\n}<\/code><\/pre>\n\n\n\n

background<\/code> is made up of eight other properties:<\/p>\n\n\n\n