Correct way to do the liniar gradient task?

Tell us what’s happening:

I found the solution to this in the ‘get a hint’ , however the solution says to use background-image which isn’t mentioned in the task text or example for the task, it just says background.

It does appear however that both work, as

background: linear-gradient(35deg, #CCFFFF, #FFCCCC);


Also worked

it could be me, but the hint also suggests that background-image is the proper way to do this.

Am I missing something. as to the correct way to do this ?



Your code so far

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



Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0.

Challenge: Create a Gradual CSS Linear Gradient

Link to the challenge:

In the challenge, it says to use background. This is a shorthand of a couple of property. So background: background-color background-image background-repeat background-attachment background-position. You can learn more about it here:

When doing a linear-gradient, most coders, uses background-image so it doesn’t get interrupted with the natural background-color.

Ah that makes sense, thanks.