-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
  • 64,305
  • 18
  • 73
  • 130
Kaleem Elahi
  • 316
  • 2
  • 14

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
  • 64,305
  • 18
  • 73
  • 130
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
  • 703
  • 1
  • 8
  • 19