CSS BACKGROUND-COLOR
The background-color property sets the background color of an element.
Inherited: No
Examples
p {
background-color: #ff0000
}
h1 {
background-color: rgb(0,255,255)
}
body {
background-color: yellow;
}
Possible Values
color: The color value can be a color name (red), a rgb value (rgb(255,0,0)), or a hex number (#ff0000)
transparent: The background color is transparent.
8 Responses
Can we define gradient background color in CSS3 ?
Yes possible in css3
http://www.webdesignerwall.com/
Gradients as in:
http://webkit.org/blog/175/introducing-css-gradients/
how about rgba(),alpha can be used in css3
Gradients possible define in css3.
Actually there is NO gradient color in the CSS3 specification. Some browsers have implemented (very different) ways of specifying gradients using CSS, but they are not CSS3. We likely won’t see any convergence of the different methods until and if gradients are part of a later CSS specification.
@PLasebo:
Yes it is possible:
p {background-color: #00ff00
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #6b666b), color-stop(1, #333033) );
background:-moz-linear-gradient( center top, #6b666b 5%, #333033 100% );
}
Just what I needed thank you. Just need to find a color wheel and I’m sorted!