Tuesday, 21 July 2015

Web Designing Tutorials(Background Images and Background Positions)

You can set your backgrounds to be images, if you prefer. The CSS property to use is background-image. For the value, you specify the location of your image. This goes between round brackets and after the word url. The image name is surrounded with single quote marks:
BODY {
background-image: url(‘my_image.gif’);
}
The same rules on image referencing you learned earlier apply here. The above code, therefore, references an image in the same folder as the current web page. You could place your background images in a folder called backgrounds. The code would then be:

No comments:

Post a Comment