Browse a live gallery of hover effects for buttons, text links and images. Hover a card to try it, customize the colors, timing and easing, and copy lightweight HTML and CSS with keyboard focus and reduced-motion support built in.
Last updated:
Hover over (or tab to) any card to try the effect, then click Customize.
Effect
Advertisement
Advertisement
How to use the CSS Hover Effects Generator
Choose Buttons, Links or Images at the top.
Hover the cards in the gallery and click Customize on the one you like.
Adjust colors, duration, easing and corner radius; change the button, link or caption text.
Tick Show hover state to freeze the effect in its hovered look while you fine-tune it.
Copy the CSS and HTML, or download a demo page to test it on its own.
How CSS hover effects work
A hover effect is a pair of states plus a transition between them:
The transition lists which properties animate, how long they take and with which easing curve. Effects that reveal a fill or a streak use a pseudo-element (::before or ::after) that is moved or scaled with transform, while the button keeps overflow: hidden so the extra layer stays inside its corners.
Easing curves at a glance
Easing
Motion
Use it for
ease
Quick start, gentle end (the browser default)
Almost anything
ease-out
Fast start, slows down at the end
Elements responding to the pointer, fills, underlines
ease-in-out
Slow start and end
Longer movements such as image zooms
linear
Constant speed
Color changes, shine sweeps
cubic-bezier(.34,1.56,.64,1)
Overshoots slightly, then settles
Playful grow and arrow effects
cubic-bezier(.22,1,.36,1)
Very smooth deceleration
Premium-feeling lifts and slides
Tips for good hover effects
Use one clear effect per element. Combining a lift, a color change and a shine on the same button usually feels busy.
Keep the same effect for the same kind of element across your site so visitors learn what is clickable.
Check the contrast of both states: a fill effect changes the text color, so test the hovered colors as well.
Do not hide important information behind hover only; touch devices cannot hover.
Add will-change: transform only if an effect stutters, not to every element.
Frequently asked questions
How do I add a hover effect in CSS?
Write the normal style of the element, add a transition for the properties that change (for example transition: transform 300ms ease), then write a :hover rule with the new values. The browser animates between the two states. The generator outputs exactly this structure.
Which CSS properties are best to animate on hover?
transform and opacity are the smoothest because browsers can animate them on the GPU without recalculating layout. Colors, box-shadow and background-position are fine for small elements. Avoid animating width, height, margin or top, which force layout work on every frame.
What is a good hover transition duration?
Most interface hover effects feel right between 150 and 400 milliseconds. Shorter feels instant and snappy, longer feels smooth but can seem sluggish on buttons. Larger movements, such as an image zoom, can take 400 to 700 milliseconds.
Why does the code include :focus-visible?
People who navigate with a keyboard never hover. Applying the same style on :focus-visible shows them the effect when they tab to the button or link, which is also an accessibility requirement for visible focus.
Do hover effects work on phones?
Touch screens have no real hover. Mobile browsers usually apply :hover briefly on tap, so the effect should be a bonus, never the only way to reveal content. For caption overlays, consider showing the caption by default on small screens.
What does the reduced motion option do?
It adds a @media (prefers-reduced-motion: reduce) block that turns transitions off for visitors who asked their operating system to minimize animation. The hover style still changes, just without the movement.
Can I combine two hover effects?
Yes, as long as they change different properties. For example, the lift effect (transform, box-shadow) works with outline to solid (background, color). Merge the transition lists into one transition declaration, because a second transition line replaces the first.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.