syntax for creating the gradient in CSS


/ Published in: CSS

CSS gradients help you to display transitions between more than two colors. In order to create a linear gradient, you must represent at least two color stops. Color stops are the colors you desire to render smooth transitions among. In addition to the gradient effect, you can also set a starting point and a direction.

The syntax for creating the gradient in CSS is
background-image: linear-gradient(direction, color-stop1, color-stop2, ...);


Copy this code and paste it in your HTML
  1. background-image: linear-gradient(direction, color-stop1, color-stop2, ...);

URL: https://www.courseya.com/css-interview-questions/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.