-2

I don't want pattern, but simple linear-gradient.

But, By using following code I have got a background pattern strips.

body {
  background: linear-gradient( to top, #ffffff, #e6e6e6);
}

Checkout : Screenshot

Johannes
  • 59,058
  • 16
  • 59
  • 114
Kaleem Elahi
  • 176
  • 1
  • 12

2 Answers2

2

You don't have any contents and no height, that's the reason for the stripes. Add height or contents, that will do it.

html, body {
  height: 100%;
}
body {
  background: linear-gradient( to top, #ffffff, #e6e6e6);
}
Johannes
  • 59,058
  • 16
  • 59
  • 114
0

body {
  background: linear-gradient( to top, #ffffff, #e6e6e6);
  height: 100%;
  margin: 0;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

From the linked question, this stops the background from repeating and sets the height of the graphic to 100% so it's not just one line

L_Church
  • 693
  • 1
  • 9
  • 19