CSS Backgrounds

 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

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...