0

Trying to place a top-to-bottom gradient as my background, but for some reason vertical gradients are causing the background to create scanlines.

Image Of Issue

Here's my stylesheet:

body{
    background-image: linear-gradient(red, yellow);
    background-size: cover;
    width: 50%;
    padding-left: 25%;
}
ralph367
  • 3
  • 4

1 Answers1

1

Add a min-height to your body.

body{
    background-image: linear-gradient(red, yellow);
    background-size: cover;
    width: 50%;
    padding-left: 25%;
    min-height: 100vh;
}
Richard Henage
  • 1,758
  • 1
  • 3
  • 10