Search code examples
cssgradientlinear-gradients

why is this css gradient acting weird?


newbie here. im trying to put the gradient in the whole element. it actually works and all that but the gradient just looks weird when I try to put in these shades...here's the screenshot for what I'm talking about. i tried to search for the solutions but I cant seem to find any. are gradients supposed to act like this? like I mean with all those repeated rectangles and all..? and the rectangles there appear even harder (in color and all) when i try to rotate the gradient. yikes.


Solution

  • So basically you are not adjusting the size and the background is repeating.Try using this Code below

      background-image: linear-gradient(120deg,white,black);
      background-repeat: no-repeat;
      background-size: 768px 1024px;