Basic example
Hover effect appears when a user positions computer cursor over an element without activating it.
Showing the animation effect
As you can see in the above example, you can add any animation to any element on the page by using the following classes:
-
transition
: used to animate the chaged properties on hover, -
duration-x
: used to define the duration of the animation wherex
is the time in milliseconds; e.g.duration-300
.
Then, you should be able to add any type of animation by changing the
property on hover by using the class:
[hover:tw-class-name]
e.g. hover:opacity-100
.
Color
Change the color and opacity by manipulating color and
.hover:opacity-*
classes. Have a look at our
masks
docs to learn more.
Gradient
Set a fancy gradient as an overlay.
Zoom
Use .hover:scale-110
class to any element to apply zoom.
Shadow
Use .hover:shadow-lg
class to any element to apply the effect.
If you are looking for more advanced options, try Bootstrap Hover effects from MDBootstrap.