Download
    Interview Question     &Answer
Main Menu
CSS Background@ Shwetank education.com
Definition -  The background-color property specifies the background color of an element.

The background color can be specified by:
* Name - a color name, like "red"
* RGB - an RGB value, like "rgb(255,0,0)"
* Hex - a hex value, like "#ff0000"
CSS Background Colors.
In CSS property of background-color use to set the background color of any element in web pages.
Example
BODY { background-color: white }
H1 { background-color: #080808 }
CSS Background Image.
CSS property of background-image sets the background image for any supported element.
body {background-image:url('paper.gif');}
body {background-image:url('2.jpg');}
CSS Background Repeat.
In CSS property of background-repeat determines how a specified background image is repeated or not. The repeat-x value will repeat the image horizontally while the repeat-y value will repeat the image vertically.
Syntax:
background-repeat: <value>
Example
BODY { background: white url(2.gif);
background-repeat: repeat-x }
Background Image - Set position and no-repeat
When using a background image, use an image that does not disturb the text.
Example
body
{
background-image:url('img_tree.png');
background-repeat:no-repeat;
}
Background - Shorthand property
When using the shorthand property the order of the property values are:
* background-color
* background-image
* background-repeat
* background-attachment
* background-position
Example
body {background:#ffffff url('2by.png') no-repeat right top;}


IT  Projects Links
M-Tech Thesis
Php Project
Java Project
Asp.Net Project
Android Project
Vb .Net Project
Html Project

------------------------------- Electronics  Project
Networking
Embedded system
Telecom
Robotics
CCNA
------------------------------- Latest IT  News


Copyright 2010-2015    shwetankeducation.com
Privacy & Terms