CSS Backgrounds
CSS provides properties to control the background of elements. Some commonly used properties include:
Background-color: Sets the background color of an element. For example:
body {
background-color: #f2f2f2;
}
Background-image: Specifies an image to be used as the background. For example:
.header {
background-image: url("header-bg.jpg");
background-repeat: no-repeat;
background-size: cover;
}
No comments:
Post a Comment