Convert Figma logo to code with AI

codrops logoHoverEffectIdeas

Some inspiration and modern ideas for subtle hover effects.

1,592
313
1,592
4

Top Related Projects

Pure CSS Image Hover Effect Library

29,203

A collection of CSS3 powered hover effects to be applied to links, buttons, logos, SVG, featured images and so on. Easily apply to your own elements, modify or just use for inspiration. Available in CSS, Sass, and LESS.

8,433

CSS3 Animations with special effects

This repo is archived. Thanks!

JavaScript, SCSS, Sass, Less, and Stylus helpers for rendering high-resolution image variants

Tasty CSS-animated Hamburgers

Quick Overview

HoverEffectIdeas is a collection of creative hover effects for images and text, designed for modern web interfaces. It showcases various interactive animations and transitions that can be applied to elements when users hover over them, enhancing the overall user experience and visual appeal of websites.

Pros

  • Provides a wide range of unique and visually appealing hover effects
  • Easily customizable and adaptable for different projects
  • Uses modern CSS techniques, including CSS Grid and Flexbox
  • Includes both image and text hover effects

Cons

  • Some effects may require additional JavaScript for full functionality
  • Not all effects may be suitable for accessibility or performance-sensitive projects
  • Limited browser compatibility for some advanced CSS features used
  • Lack of comprehensive documentation for each effect

Code Examples

  1. Basic image hover effect with overlay:
<figure class="effect-lily">
    <img src="img/1.jpg" alt="img01"/>
    <figcaption>
        <h2>Nice <span>Lily</span></h2>
        <p>Lily likes to play with crayons and pencils</p>
        <a href="#">View more</a>
    </figcaption>			
</figure>
  1. Text hover effect with split animation:
<h2 class="grid__item-title">
    <span class="grid__item-title-inner" data-splitting>Splitting</span>
</h2>
  1. CSS for a simple hover effect:
.effect-lily img {
    max-width: none;
    width: -webkit-calc(100% + 50px);
    width: calc(100% + 50px);
    opacity: 0.7;
    -webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
    transition: opacity 0.35s, transform 0.35s;
    -webkit-transform: translate3d(-40px,0, 0);
    transform: translate3d(-40px,0,0);
}

.effect-lily:hover img {
    opacity: 1;
}

.effect-lily:hover img {
    -webkit-transform: translate3d(0,0,0);
    transform: translate3d(0,0,0);
}

Getting Started

To use these hover effects in your project:

  1. Clone the repository:

    git clone https://github.com/codrops/HoverEffectIdeas.git
    
  2. Include the necessary CSS and JavaScript files in your HTML:

    <link rel="stylesheet" type="text/css" href="css/normalize.css" />
    <link rel="stylesheet" type="text/css" href="css/demo.css" />
    <link rel="stylesheet" type="text/css" href="css/set1.css" />
    <script src="js/modernizr.custom.js"></script>
    
  3. Copy the HTML structure for the desired effect and customize as needed.

  4. Adjust the CSS to match your design requirements.

Competitor Comparisons

Pure CSS Image Hover Effect Library

Pros of imagehover.css

  • Lightweight and easy to implement with minimal CSS and HTML
  • Provides a wide variety of hover effects out of the box
  • Responsive and works well on mobile devices

Cons of imagehover.css

  • Limited customization options compared to HoverEffectIdeas
  • Fewer advanced or complex effects available
  • May require additional CSS for fine-tuning specific use cases

Code Comparison

imagehover.css:

<figure class="imghvr-fade">
  <img src="image.jpg">
  <figcaption>
    Hover Content
  </figcaption>
</figure>

HoverEffectIdeas:

<div class="grid">
  <figure class="effect-lily">
    <img src="image.jpg" alt="img12"/>
    <figcaption>
      <div>
        <h2>Nice <span>Lily</span></h2>
        <p>Lily likes to play with crayons and pencils</p>
      </div>
    </figcaption>			
  </figure>
</div>

The code comparison shows that imagehover.css has a simpler HTML structure, while HoverEffectIdeas offers more detailed markup for complex effects. HoverEffectIdeas provides more flexibility in terms of content structure within the hover effect, allowing for headings, paragraphs, and other elements to be easily incorporated.

29,203

A collection of CSS3 powered hover effects to be applied to links, buttons, logos, SVG, featured images and so on. Easily apply to your own elements, modify or just use for inspiration. Available in CSS, Sass, and LESS.

Pros of Hover

  • More comprehensive library with a wider variety of hover effects
  • Better documentation and easier to implement
  • Includes SASS/SCSS support for more flexible styling

Cons of Hover

  • Larger file size, which may impact page load times
  • Less customizable for advanced users
  • Some effects may appear dated or overused

Code Comparison

HoverEffectIdeas:

.hover-effect {
  transition: all 0.3s ease;
}
.hover-effect:hover {
  transform: scale(1.1);
}

Hover:

.hvr-grow {
  display: inline-block;
  vertical-align: middle;
  transform: translateZ(0);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0);
  backface-visibility: hidden;
  -moz-osx-font-smoothing: grayscale;
  transition-duration: 0.3s;
  transition-property: transform;
}
.hvr-grow:hover,
.hvr-grow:focus,
.hvr-grow:active {
  transform: scale(1.1);
}

The code comparison shows that Hover provides more detailed CSS with additional properties for cross-browser compatibility and smoother animations, while HoverEffectIdeas offers a simpler, more lightweight approach.

8,433

CSS3 Animations with special effects

Pros of magic

  • Simpler implementation with CSS-only animations
  • Lightweight and easy to integrate into existing projects
  • Wider variety of animation types (e.g., static, rotation, perspective)

Cons of magic

  • Less customizable than HoverEffectIdeas
  • Fewer advanced effects and 3D transformations
  • Limited to predefined animation styles

Code Comparison

magic:

.magictime {
  -webkit-animation-duration: 1s;
  animation-duration: 1s;
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
}

.puffIn {
  animation-name: puffIn;
}

HoverEffectIdeas:

this.tl = new TimelineMax().add([
  TweenMax.to(this.DOM.revealInner, 0.25, {
    ease: Sine.easeInOut,
    startAt: {x: '-100%'},
    x: '0%'
  }),
  TweenMax.to(this.DOM.revealImg, 0.25, {
    ease: Sine.easeInOut,
    startAt: {x: '100%'},
    x: '0%'
  })
]);

The code comparison shows that magic relies on CSS animations, while HoverEffectIdeas uses JavaScript (GSAP) for more complex animations. This difference highlights the simplicity of magic and the advanced capabilities of HoverEffectIdeas.

This repo is archived. Thanks!

Pros of Effeckt.css

  • More comprehensive library with a wider range of effects beyond just hover
  • Better documentation and examples for implementation
  • Actively maintained with recent updates and contributions

Cons of Effeckt.css

  • Larger file size due to more extensive features
  • Steeper learning curve for beginners
  • Less focused on specific hover effects compared to HoverEffectIdeas

Code Comparison

HoverEffectIdeas:

.hover-effect {
  transition: all 0.3s ease;
}
.hover-effect:hover {
  transform: scale(1.1);
}

Effeckt.css:

.effeckt-button {
  position: relative;
  overflow: hidden;
}
.effeckt-button::before {
  content: attr(data-label);
  position: absolute;
}

HoverEffectIdeas focuses on simple, direct hover effects, while Effeckt.css provides more complex, customizable animations and transitions for various UI elements. HoverEffectIdeas is ideal for quick implementation of hover effects, whereas Effeckt.css offers a broader range of animation possibilities for more comprehensive projects.

JavaScript, SCSS, Sass, Less, and Stylus helpers for rendering high-resolution image variants

Pros of retinajs

  • Focused on handling high-resolution displays, providing a specific solution for image quality
  • Lightweight and easy to implement for retina-ready images
  • Automatically detects device pixel ratio and adjusts image sources accordingly

Cons of retinajs

  • Limited in scope compared to HoverEffectIdeas, which offers a variety of hover effects
  • May require additional image assets for different resolutions, increasing project size
  • Less versatile for general UI enhancements beyond image quality

Code Comparison

retinajs:

retinajs();
// or with options
retinajs( {check_mime_type: true, force_original_dimensions: false} );

HoverEffectIdeas:

.hover-effect {
  transition: all 0.3s ease;
}
.hover-effect:hover {
  transform: scale(1.1);
}

The code snippets demonstrate the simplicity of implementing retinajs compared to the CSS-based approach of HoverEffectIdeas. While retinajs focuses on image quality optimization, HoverEffectIdeas provides more flexibility for creating interactive UI elements through CSS transitions and transforms.

Tasty CSS-animated Hamburgers

Pros of Hamburgers

  • Focused specifically on hamburger menu animations, offering a wide variety of styles
  • Includes SCSS mixins for easy customization and integration
  • Provides a live demo page with all animations for easy selection

Cons of Hamburgers

  • Limited to hamburger menu animations, less versatile than HoverEffectIdeas
  • Requires SASS compilation for full customization, which may not suit all projects
  • Larger file size due to the number of animation options

Code Comparison

HoverEffectIdeas:

.hover-effect {
  overflow: hidden;
  position: relative;
}
.hover-effect::before {
  content: '';
  position: absolute;
}

Hamburgers:

.hamburger {
  padding: $hamburger-padding-y $hamburger-padding-x;
  display: inline-block;
  cursor: pointer;
}
.hamburger-inner {
  display: block;
  top: 50%;
  margin-top: $hamburger-layer-height / -2;
}

Both repositories offer CSS-based animations, but they serve different purposes. HoverEffectIdeas provides a broader range of hover effects for various elements, while Hamburgers focuses exclusively on hamburger menu animations. HoverEffectIdeas is more versatile and can be applied to different UI elements, whereas Hamburgers offers a comprehensive set of options for a specific UI component.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Hover Effect Ideas

Some inspiration and modern ideas for subtle hover effects.

Article on Codrops

Demo

Images by Unsplash. Feather Icons by Cole Bemis. [Font Awesome Icon Font] (http://fortawesome.github.io/Font-Awesome/) created by Dave Gandy.

Integrate or build upon it for free in your personal or commercial projects. Don't republish, redistribute or sell "as-is".

Read more here: License

© Codrops 2014