Home > Blockchain >  How to have vertical gradient lines become horizontal?
How to have vertical gradient lines become horizontal?

Time:12-15

How do I get these vertical lines to become horizontal? enter image description here

So the image looks like this:

enter image description here

I tried doing 0deg

to bottom didn’t work either.

It should work with to bottom but it is not.

body {
   background: linear-gradient(to right, white 0, white 72px, red 72px, red 74px, white 74px, white 108px, red 108px, red 110px, white 110px, white 144px, red 144px, red 146px, white 146px, white 180px, red 180px, red 182px, white 182px, white 216px, red 216px, red 218px, white 218px, white 252px, red 252px, red 254px, white 254px, white 288px, red 288px, red 290px, white 290px, white 360px);
}

CodePudding user response:

Try this.

body {
  background-image: linear-gradient(to bottom, red 1px, white 1px);
  background-size: 72px 72px;
}

  • Related