<body style="background-color: lightblue;">
<body style="background-color: #ADD8E6;">
<body style="background-color: rgb(173, 216, 230);">
body {
background-color: lightblue;
}
body {
background-color: #ADD8E6;
}
body {
background-color: rgb(173, 216, 230);
}
black
, white
, gray
, etc.
#000000
- #FFFFFF
rgb($red, $green, $blue)
rgba($red, $green, $blue, $alpha)
hsl($hue, $saturation, $lightness)
hsla($hue, $saturation, $lightness, $alpha)
<body style="background: linear-gradient(to right, red, blue);">
<body style="background: radial-gradient(circle, red, yellow, green);">
body {
background: linear-gradient(to right, red, blue);
}
body {
background: radial-gradient(circle, red, yellow, green);
}
Linear Gradients:
Radial Gradients:
Global Gradient Values:
This example shows how to style a light blue background color using a named color.
body {
background-color: lightblue;
}
This example shows how to style a peach colored background using a hex value.
body {
background-color: #FFC196;
}
This example shows how to style a warm yellow background using RGB values.
body {
background-color: rgb(255,246,150);
}
This example shows a linear gradient from red to yellow.
background: linear-gradient(to right, red, yellow);
This example shows a radial gradient from red to yellow.
body {
background: radial-gradient(circle, red, yellow);
}
This example shows a spiral gradient effect.
background: conic-gradient(red, yellow, green, blue, red);