<div class="bg-gradient-to-r from-cyan-500 to-blue-500 ">
. . . .
I have tried the above code. But it's a linear gradient, I want a vertical gradient.
<div class="bg-gradient-to-r from-cyan-500 to-blue-500 ">
. . . .
I have tried the above code. But it's a linear gradient, I want a vertical gradient.
But it's a linear gradient, I want a vertical gradient.
linear is a type of gradient, vertical is a direction. You probably meant that you have horizontal gradient and you want vertical. They would both be linear though.
All default available directions that you can use for linear gradient:
So for vertical direction just use bg-gradient-to-t (from bottom to top) or bg-gradient-to-b (from top to bottom)