2

How could I create the curve like the top blue border with Tailwind CSS classes explicitly not using CSS stylesheet?

enter image description here

krishnaacharyaa
  • 14,953
  • 4
  • 49
  • 88
林廷奕
  • 45
  • 4

1 Answers1

2

Edit: After some research, i figured out a way to achieve this.

Rounded Border:

<div class="overflow-x-hidden">
  <div class="absolute bottom-0 mt-[100px] ml-[-50%] h-[500px] w-[200%] rounded-t-[100%] bg-gradient-to-b from-blue-400 via-blue-500 to-blue-600">
    <div class="mt-5 text-center text-2xl text-white">Footer</div>
  </div>
</div>

Output:

enter image description here

Rounded Corners:

Using rounded class with attribute value for simple curve at corners.

<div class="h-[100px] rounded-t-[100px] bg-blue-500">
  <div class="p-5 text-center text-2xl text-white">Footer</div>
</div>

Output:

enter image description here

Refer: https://play.tailwindcss.com/fV3c2H8TOu for further changes

krishnaacharyaa
  • 14,953
  • 4
  • 49
  • 88