Css Background Examples - Css

What are all the background properties in css?

Snippet Code


  
Rate this page :
  [ 0 votes]

Background in css is a simple property which allows you to set background color, image, position, size, attachment. The sample code given below is used to set background effect for an element.

<style> body { background-image: url('http://4.bp.blogspot.com/_mGkoANc7fi0/TQdHMNHe0uI/AAAAAAAAAVU/ZqiWGSCJUL8/w200/185_pd21695_1.jpg'); background-repeat: repeat; background-position: left top; } </style> <body> <h1>Hello World!</h1> <p>background-image example.</p> <p>background-repeat example.</p> <p>background-position example.</p> </body>

Tags


Ask Questions

Ask Question