#CSS's degrees
35 messages · Page 1 of 1 (latest)
I made this for you, maybe it will help
https://codepen.io/tok124/pen/OJKbqYR
ty bro ❤️
No problem 🙂
bro as you see in your trigonometric circle 180 degree is a vertical line but when i use 180 deg in my project the lines become a horizontal line
so they dont work like that
Yeah. in linear gradient 0 degrees is vertical bottom to top, 90degrees is horizontal left to right, 180degrees is vertical top to bottom, 270 degrees is horizontal right to left
they may be clockwise which is the opposite of mathematics
but bro 0 and 180 are horizontal left to right
and 90 and 270 are vertical
0 degrees is vertical bottom to top,
90degrees is horizontal left to right,
180degrees is vertical top to bottom,
270 degrees is horizontal right to left
@peak ravine and btw, 180deg is the default
The movement of the colors is vertical, but the colors themselves are horizontal
for 0 and 180
there is nothing horizontal with 0/180deg. Except from how they are written in the code. But that does not affect the gradient itself
background:
linear-gradient(
0deg,
red,
blue
);
gives same result as
background: linear-gradient(0deg,red, blue);
look at the single color
i have always seen 0 degrees as being at the top
like in this example
but if it makes it easier for you, you can do something like
background:conic-gradient(from 90deg, red 180deg, blue 0);
You see here
so it starts from 90 deg which is same as 0 deg as you know it
oh so you mean these degrees are for the type of movement of the colors not to the coordinates of the colors themselves?
in 0 and 180 they are mixed from top to bottom (vertical)
Well. linear-gradient and conic-gradient is a lot different type of gradients. So the degrees are kinda different between linear and conic
it would make more sense if in linear gradient 0deg was top to bottom and 180deg was bottom to top. That makes more sense to me at least
No problem 🙂
should i delete this post?
no need to delete it, you can close it if you want