Interactive online courses HTML Academy
2026-03-09 14:09 Diff

Gradients can be set diagonally, from corner to corner. To do this, you need to combine top, bottom and left, right. For example, a gradient that goes from the bottom left to the top right corner:

background-image: linear-gradient(to right top, yellow, green);

Here are some examples of diagonal gradients with the colors yellow, green:

to right topto right bottomto left bottomto left top