DEV Community

TK
TK

Posted on • Updated on

linear-gradient() angle πŸ“

The demo below is done in linear-gradient playground.
Special thanks to Mike White for the awesome playground ✨

How does angle argument makes a change

Gradient starts from white⬜️ to redπŸŸ₯.

0deg = to top
angle-0

45deg = to right top

angle-45

90deg = to right
angle-90

180deg = to bottom
angle-180

270deg = to left
angle-270

360deg(Same as 0deg)
angle-360

gif
angle-in-motion

Reference

Top comments (2)

Collapse
 
afif profile image
Temani Afif

to right top is not equal to 45deg: jsfiddle.net/50e2cwv1/

Collapse
 
takuyakikuchi profile image
TK

Thanks for your comment and the demo!