Float Animation
A float animation for elements
Demo
MAX
Acquire the MAX Plan
Unlock unlimited potential with our most advanced features and priority support.
Float Animation
This is a simple float animation that you can use for elements that enter the viewport.
Installation
Copy and paste the following code into your project.
Add the class animate-float-custom
to the element you want to animate.
@layer utilities {
.animate-float {
animation: float 3s ease-in-out infinite;
}
@keyframes float {
from {
transform: translateY(0);
}
to {
transform: translateY(-20px);
}
}
}
Use the class animate-float-custom
to apply the animation to an element.
<div class="animate-float">
<!-- Your content here -->
</div>