CSS background property
comment 0

CSS Background Property

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.

View More   View Demo

Filed under: CSS

About the Author

Posted by

Sani Halid is a front-end developer at Stampede and is committed to clean and elegant code. Yet another gamer to join the pack, Sani is also the Editor at Constructs where he shares his daily CSS findings and other front-end development goods.

Leave a Reply