Pages

Monday, March 12, 2012

Effects using css file


Background Effects:
To give background effect using css:-

Property and its code :

a] Color - {background-color:#aaaaaa; } else {background:#aaaaaa; }

b] Image -{background-image: url (abc.jpg) ; } else
    {background-image: url (image/abc.jpg) ; }
    /* if the image is placed inside a particular folder. */
c] Repeat Background 
  •    { background-repeat:no-repeat;}
  •     Horizontal Repeat { background-repeat:repeat-x;}
  •     Vertical Repeat { background-repeat:repeat-y;}

d] Position Image:

   background-position: center center;
   Position can be :
  •    top left, top center, top right;
  •    center left, center center, center right;
  •    bottom left, bottom center, bottom right;

To use image as a background u can follow the below steps:

  • Create a image of width =1px and height= 700px; Save it as Image for web in adobe Photoshop with extension as .jpg file.
  • Go to  css file of the webpage and type the following;

          { background-image:url(abc.jpg);
            background-repeat:repeat-x;
            background-attachment:fixed;
          }
OR
          { background:url(image/abc.jpg) repeat-x fixed;    }
          

No comments:

Post a Comment