Background in CSS
The background property allows you to set a background color, image, and other properties for an element. Some examples include:
background-color: Specifies the background color. Example:
css
body {
background-color: #f0f0f0;
}
background-image: Specifies the background image. Example:
css
div {
background-image: url('image.jpg');
}
background-repeat: Specifies how the background image should repeat. Example:
css
div {
background-repeat: no-repeat;
}
No comments:
Post a Comment