What I'm trying to do using Tailwind CSS is when data is loading, I want to put an animation spin, but the animation -spin I want to be overlay, and in the center.
This is what I have done by far:
<div className="flex justify-center">
<svg
className="animate-spin -inline-block w-8 h-8 border-4 rounded-full"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
>
<circle
className="opacity-25"
cx="12"
cy="12"
r="10"
stroke="currentColor"
strokeWidth="4"
></circle>
<path
className="opacity-75"
fill="currentColor"
></path>
</svg>
</div>
By far, the circle is shown on the top center and it's not overlaying at all.
How can I solve this?