Create a Gradual CSS Linear Gradient:Explain

whether we can add only 3 colors? or we can add n number of colors in the syntax:-linear-gradient?

Your code so far


<style>

  div{ 
    border-radius: 20px;
    width: 70%;
    height: 400px;
    margin: 50px auto;
    background:linear-gradient(35deg,#ccffff,#ffcccc);
  }

</style>

<div></div>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/applied-visual-design/create-a-gradual-css-linear-gradient

Generally the ... in examples means that you can keep going forever.

And you can always check out the great definitions on MDN.

1 Like