Kevin Wu
Kevin Wu

Reputation: 1477

CSS Linear Gradient angle

If I specify 70° in my linear gradient function, does that mean 70° from the y-axis clockwise or 70° from the x-axis counterclockwise/20° from the y-axis clockwise. Both seem to have been supported at some point...

Upvotes: 0

Views: 145

Answers (2)

Fergus
Fergus

Reputation: 2982

According to the documentation, its basis is from the y-axis.

enter image description here

Upvotes: 0

Kevin Wu
Kevin Wu

Reputation: 1477

Ok it seems that with modern browsers, 70° means 70° clockwise from the y-axis, while older browsers implementing an older, prefixed specification would interpret this as 20° from the y-axis clockwise.

Upvotes: 1

Related Questions