fixed background image means if even a page scrolls an image will still remain intact and fixed and will not move with the image up and down.
<html>
<head>
<style type= "text/css".
body
{
background-image:
url ( 'smiley.gif' )
background-repeat
no-repeat;
background-attachment:
fixed
}
</style>
</body>
<body>
<p> the image will not scroll with the rest of the page </p>
<p> the image will not scroll with the rest of the page </p>
<p> the image will not scroll with the rest of the page </p>
<p> the image will not scroll with the rest of the page </p>
<p> the image will not scroll with the rest of the page </p>
<p> the image will not scroll with the rest of the page </p>
<p> the image will not scroll with the rest of the page </p>
<p> the image will not scroll with the rest of the page </p>
<p> the image will not scroll with the rest of the page </p>
<p> the image will not scroll with the rest of the page </p>
<p> the image will not scroll with the rest of the page </p>
<p> the image will not scroll with the rest of the page </p>
<p> the image will not scroll with the rest of the page </p>
</body>
</html>
ALL BACKGROUND PROPERTIES IN ONE DECLARATION:-
<style type="text/css">
body
{
background: #00ff00 url( 'smiley.gif' ) no -repeat fixed center;
}
</style>
April 17, 2009
0 How to set the fixed background image
Posted by raj on 5:32 AM
0 comments:
Post a Comment