Background in CSS

 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

The Importance of Cybersecurity in the Digital Age

 The Importance of Cybersecurity in the Digital Age Introduction: In today's digital age, where technology is deeply intertwined with ev...