animation with gradiants
hi
how can i get a animation css like this
which lets me to rotate stuff in the background without rotating the box
I got 2 issues here
first is about going
how can i animate it like conic gradient above?
2nd is how can i animate this
again i want to rotate the background not the box with the -25% inset like below
i would appreciate if u could say it
and the rotations should work this is real code unless i missed sth (i mean u can see it for yourself what i mean but for the last one use inspect then u see the before is rotating not background)
7 Replies
emmmmmm aynone got any idea ?
well, the conic and linear will work because the direction/angle is part of syntax
conic-gradient(from var(--deg), red, blue, green)
linear-gradient(var(--deg), red, blue, green)
a radial-gradient doesn't have that.
you could try to rotate the box with var(--deg) and set a overflow hidden on the parent. But then you'll have to make sure the size of the box is okay (hard to tell without a real example)
something like this: https://codepen.io/MarkBoots/pen/wvVgbJx?editors=1100
maybe make a codepen so we can tryyea tnx man
but for the second i dont want rotate i just want the inside ones to rotate without the rotate and increasing the size of the picture
I had the idea of making it to go around with at var var but thats a lot of problem so for multiple gradiants is there a simpler way to do it?
but for the first one i see now what is cahgnes and tnx a ton
@R.I.P https://codepen.io/tok124/pen/MWNoqOm
Here you have a rotating radial gradient. No rotating pseudo element or anything like that here. Just a single div with a ball that spins around a circular path inside the element
Btw, if you want multiple radial-gradients that spins around a circular path, you can do this
https://codepen.io/tok124/pen/rNXwqBK
Still no pseudo element. Just a single div with multiple radial-gradients
tnx a ton man
No problem 🙂