Here is a good reading material for beginners to learn about CSS background
property. CSS background
have eight properties which are:
- background-image
- background-position
- background-size
- background-repeat
- background-attachment
- background-origin
- background-clip
- background-color
The property background
itself is a shorthand notation which will allow you to write combination from the other CSS background properties into one declaration only. For example:
.example { background: url(beach.jpg) no-repeat blue; }
This example combines three different background
properties into one declaration for setting the image url, making the image not repeated and setting blue as the fallback color. Hit the button below to learn more about CSS background
properties by Chris Coyier and don’t forget to check out the Codepen demo by Timothy Miller.