
Shobha
The best way to predict the future is to invent it
How do you create a gradient background in CSS?
To create a gradient background in CSS, you use the linear-gradient() or radial-gradient() functions within the background-image property. The linear-gradient() creates a gradient effect that transitions smoothly between multiple colors along a straight line, while radial-gradient() generates a circular or elliptical color transition. These gradients are used to create visually appealing backgrounds without relying on images, providing scalability and responsiveness to designs. For instance, background-image: linear-gradient(to left, #ff7f50, #ff6347); applies a gradient that flows from coral to tomato color from right to left.