May 5, 2009

0 CSS Background

the CSS background define the background effects of an element.

Examples

Set the background color:-

this tutorial demonstrates how to set the background color for an element.

<html>
<head>
<style type="text/css">
body {background-color:yellow}
h1 {background-color: #00ff00}
h2 {background-color: transparent}
p {background-color: rgb(250,0,255))
</style>
</head>
<body>
<h1>this is header</h1>
<h2>this is header</h2>
<p>this is a paragraph</p>
</body>
</html>

Set an image as Background:-

<style type="text/css">
body
{
background-image:
url('your image url here')
}
</style>










this is header


this is header


this is a paragraph







0 comments:

Post a Comment

Blogger Themes

 
Powered by Blogger