1οΈβ£ What is the gradient?
CSS gradient allows you to create anything from a smooth gradient between two colors, right up to impressive mixing and multiple gradients.
Gradient makes the background more attractive than a solid color.
CSS gradient allows you to create anything from a smooth gradient between two colors, right up to impressive mixing and multiple gradients.
Gradient makes the background more attractive than a solid color.
2οΈβ£ Types of gradients?
There is three gradient function in CSS.
βΌ Linear Gradient
βΌ Radial gradient
βΌ Conic gradient
Let's talk about each type in more detail.β¨
There is three gradient function in CSS.
βΌ Linear Gradient
βΌ Radial gradient
βΌ Conic gradient
Let's talk about each type in more detail.β¨
βΌ Before we move further let's discuss some key terms -
- Size
- Shape
- Position
- color-stop ( Same as linear one )
Let's dive deeper π
- Size
- Shape
- Position
- color-stop ( Same as linear one )
Let's dive deeper π
β Shape -
This determines the shape of the gradient, and because weβre talking about radial gradients,
theyβre limited to being circular in nature.
Your shapes will be between an ellipse or a circle.
This determines the shape of the gradient, and because weβre talking about radial gradients,
theyβre limited to being circular in nature.
Your shapes will be between an ellipse or a circle.
β Position -
This works the same way it does on background-position, So, keywords like βtop,β βright,β βleft,β and βcenterβ will work here.
You can even use a combination like, βtop center.β
1/2
This works the same way it does on background-position, So, keywords like βtop,β βright,β βleft,β and βcenterβ will work here.
You can even use a combination like, βtop center.β
1/2
We can also specify an exact position using a numeric value, including the percentage.
Default is center center.
2/2
Default is center center.
2/2
β¨Conic gradient -
A conic gradient has a center point in your box and starts from the top and goes around in a 360-degree circle.
The conic-gradient function accepts the position and angle arguments.
By default, the angle is 0 degrees which starts at the top, in the center
A conic gradient has a center point in your box and starts from the top and goes around in a 360-degree circle.
The conic-gradient function accepts the position and angle arguments.
By default, the angle is 0 degrees which starts at the top, in the center
Above we already talked about position or angle, so let's see some examples.
ππ
ππ
Wait there is still a lot left to share but I think it's enough now π
but still, I have some other resources to make gradient creation easy.π€©
Let's check π
but still, I have some other resources to make gradient creation easy.π€©
Let's check π
I know this thread is huge and it's not easy to remember all the things.π§
So just hit the bookmark and save it for future reference.π
So just hit the bookmark and save it for future reference.π
Loading suggestions...