CSS Hover Effects: 40 Engaging Animations To Try
blog · css-hover-effects
text_content default
- content
Don’t come for my head, but I think it’s safe to say that static websites are officially a thing of the past. People nowadays expect some level of interactivity when they visit websites. One of the ways you can keep them engaged is by adding hover animations to your websites.
There’s no limit to the type of hover animation you could make. It could be a simple button that scales up on hover or a card that flips over 3D-style — the possibilities are endless.
In this article, we will explore 40 examples of CSS hover animations—ten of which I created myself 🙃. Hopefully, these examples help you draw inspiration and give you ideas for how to keep users engaged and provide them with a memorable experience. Let’s dive in.
40 examples of CSS hover animations
Let’s start by taking a look at ten custom animations I personally created, complete with demos and code examples!
Custom CSS hover effects
1. Holographic card
code_snippet codepen
- pen_url
- https://codepen.io/nefejames/pen/ogvNgJq
- pen_title
- Holographic card
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
As they say, you can’t beat the classics. So, we’re starting with a simple card effect where it scales up, gets a colorful border shadow, and shimmers with a holographic gradient on hover. This animation works with:
- ::before pseudo-element: Creates the holographic effect by placing a gradient background with varying opacity and rotation. It initially has 0 opacity, and on hover, it becomes visible while moving downwards
- .holographic-card:hover: Applies a scale effect (transform: scale(1.05)) and a glowing box shadow (box-shadow: 0 0 20px rgba(0, 255, 255, 0.5))
2. Liquid morph
code_snippet codepen
- pen_url
- https://codepen.io/nefejames/pen/WbeNvrr
- pen_title
- Liquid morph
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
This animation creates a liquid-like morphing effect on a button when hovered over. Initially, the button has a rounded rectangular shape with a dark blue background and a centered text label. When hovered, the button slightly rotates, its border-radius decreases, and a colorful, conic gradient appears. The CSS features powering this animation include:
- ::before pseudo-element: Creates a conic gradient background, which transitions from cyan to dark blue, giving the appearance of a liquid filling the button
- .liquid-morph-element:hover: Reduces the border-radius to 10px and applies a rotation of 15deg, giving the button a more angular shape
3. Explosive text effect
code_snippet codepen
- pen_url
- https://codepen.io/nefejames/pen/XJrWbKz
- pen_title
- Particle deconstruction
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
This animation creates an "explosive" effect when the element is hovered over. It works with the ::before and ::after pseudo-elements, which produces the radial gradient effect and scale up and rotate on hover.
4. Text underline
code_snippet codepen
- pen_url
- https://codepen.io/nefejames/pen/qEWBOBz
- pen_title
- Text hover underline
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
This animation creates a unique hover effect where underlines appear above and below the text when the user hovers over it. Its powered by the ::before and ::after pseudo-elements, which create the underline effect. The pseudo-elements grow from 0 to 100% on hover while a gradient is applied to them.
5. Dropdown menu
code_snippet codepen
- pen_url
- https://codepen.io/nefejames/pen/yyBNogQ
- pen_title
- Dropdown menu
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
This animation creates a dropdown menu that appears when hovering over a button. Initially, the dropdown menu is hidden, with its opacity set to 0, but becomes fully visible on hover. The key to this animation is the opacity, which is set to 1 on hover and transform: translateY(0), which moves the menu to its normal position.
6. Double-sided card
code_snippet codepen
- pen_url
- https://codepen.io/nefejames/pen/RNbPZpp
- pen_title
- Double-sided card
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
This animation creates a 3D flipping card effect. When the user hovers over the card, it rotates 180 degrees along the Y-axis, revealing the back side. The front and back sides of the card are identical in size but have different backgrounds and the perspective property on the cards’ container enhances the 3D effect.
This animation works with:
- transform-style: preserve-3d: Allows the cards to maintain their 3D position during rotation
- transform: rotateY(180deg): Rotates the cards along the Y-axis
7. 4-corner image
code_snippet codepen
- pen_url
- https://codepen.io/nefejames/pen/azoOyyz
- pen_title
- 4-corner image
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
This animation creates an interactive image effect where the image is divided into four quadrants on hover. The quadrants represent a different section of an image, and they are positioned to create a complete picture when assembled. Upon hovering over the container, the quadrants shift outward, creating the split effect.
It works with:
- background-image: url() applies the image to each quadrant
- background-position crops specific quadrants of the image
- transform: translate() moves quadrants outwards on hover
8. Cursor animations
code_snippet codepen
- pen_url
- https://codepen.io/nefejames/pen/emONEew
- pen_title
- Cursor animations 1
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
This animation has two effects. First, it demonstrates various CSS cursor styles on hover, and each box undergoes different visual effects, like scaling, rotating, clipping, and pulsing. Here’s a breakdown of what powers the effects in this:
- cursor: Defines unique cursor types for the different boxes
- ::before: Creates a linear gradient effect that moves diagonally from top-left to bottom-right on hover
- @keyframes pulse: Creates a pulsating effect where the box grows and shrinks in size repeatedly
- @keyframes shake: Simulates a shaking or jittery motion, like the kind used to signify "error" or "not allowed"
- @keyframes moveAround: Causes the boxes to shift slightly in various directions
- CSS transforms: transform: scale(), rotate(), translateY(), translateX(), and skew() are applied to various boxes
9. Rotating cube
code_snippet codepen
- pen_url
- https://codepen.io/nefejames/pen/gbYpxvX
- pen_title
- Rotating cube
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
This 3D animation creates an interactive cube with six faces (front, back, right, left, top, and bottom), each styled with distinct colors and a subtle gradient.The cube rotates smoothly in 3D space when hovered over, and a glass-like gradient appears on the faces. It works with:
- translateZ, rotateX, and rotateY: Position the faces to form a cube
- perspective and transform-style: preserve-3d: Ensure proper 3D rendering
- @keyframes rotate3d: Creates the continuous cube rotation
- ::before and ::after: Creates the glass-like reflections that occur on hover
10. Chameleon SVG
code_snippet codepen
- pen_url
- https://codepen.io/nefejames/pen/jENPLzQ
- pen_title
- Chameleon SVG
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
When hovered over, the card cycles through different SVG-based background patterns and shifts the pattern's position smoothly across the surface. It works with:
- background-image: Uses inline SVG data to display custom patterns
- @keyframes move-and-color: Defines the stages of animation, specifying changes to background-image and background-position
That’s it for the custom CSS hover effects. Now, let’s move on to examples from other developers. We’ll start with checking out card hover animations; view this Codepen collection to see other text animations I created.
blog_call_to_action animated
- title
Build a site with interactive 3D hover effects!
- description
Take hover effects to the next level with 3D interactions. In this creative course, we build a customizer app and landing page with real-time animations using Next.js 15, GSAP, Prismic, Three.js, Tailwind, and TypeScript!
- cta_link
{ "link_type": "Web", "key": "82365389-76dc-4aae-bf52-b34d638411e0", "url": "https://prismic.io/courses/suburbia-skateboards" }- cta_label
- View Course
- cta_type
- link
- image

- color
- green
text_content default
- content
Card CSS hover animations
These card hover animations add a unique effect that will grab the attention of your visitors’.
11. Profile card hover
code_snippet codepen
- pen_url
- https://codepen.io/codev_land/pen/yLXeyWX
- pen_title
- Profile card Hover
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
The profile card hover animation by Codev Land creates a two-layer sliding effect on a card component. When hovered, the top slide (with an icon) moves up to reveal the bottom slide containing text. This animation relies on:
- transform: translateY() (docs): Moves each slide along the vertical axis during hover
- transition (docs): Creates a smooth animation effect when both slides’ positions change on hover
12. CSS hard hover effects
code_snippet codepen
- pen_url
- https://codepen.io/obrunorocha/pen/aggLgE
- pen_title
- CSS Card Hover Effects
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
The CSS hard hover effects by Bruno Rocha creates a dynamic card hover effect, where top layer shrinks on hover to reveal the inner text-filled layer. The creator uses the transition property to add to the cards to animate changes in their height, border-radius, and font size during hover.
13. Glowing gradient glassmorphism card
code_snippet codepen
- pen_url
- https://codepen.io/kodplay/pen/oNBreRJ
- pen_title
- Glowing Gradient Glassmorphism Card
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
The Glowing gradient glassmorphism card by Kodplay creates a visually appealing card layout with a hover animation effect. Each card has a distinct style, with unique gradient backgrounds, blur effects, and hover interactions. Here's a breakdown of how the code works:
- ::before and ::after pseudo-elements: Creates gradient skewed backgrounds. On hover, the skew effect is removed, and the dimensions adjust
- transition: Animates the hover effects
- span::before and span::after: Adds blur and glow effects on hover
- backdrop-filter (docs): Adds a glassmorphism effect to the card's content
- @keyframes animate: Creatives a slight vertical motion to give a dynamic floating effect
14. Tourist cards
code_snippet codepen
- pen_url
- https://codepen.io/kjawhar15/pen/zLBaPj
- pen_title
- hovering cards
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
The tourist cards hover effect by karim jawhar features three interactive cards, each showcasing the image of a landmark. When hovered over, the cards transform by rotating along the X and Z axes, giving them a 3D effect. This animation works with:
- transform: rotateX, rotateZ, translateY, and translateZ properties create the 3D rotation and positioning effect that occurs on hover
- transition: Smoothens the change between states, especially on the transform and box-shadow, making the hover effect more fluid
15. Same height cards
code_snippet codepen
- pen_url
- https://codepen.io/veronicadev/pen/WJyOwG
- pen_title
- FlexBox Exercise #4 - Same height cards
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
The same height cards animation by Veronica is another great example. When hovered over, the cards enlarge slightly and reveal more information about the items, such as a "like" icon and time information. At the same time, the image becomes partially opaque as its opacity reduces.
This animation relies on:
- transform: scale: Enlarges the card on hover, making it appear to "pop" out
- card__img--hover class: Handles the changes that occur on the background image when hovered. The image properties that change include opacity (docs), background-size (docs), and background-position (docs)
Icon CSS hover effects
Let’s take a look at some icon hover effects that will be sure to make your website stand out.
16. Social media icons hover effect
code_snippet codepen
- pen_url
- https://codepen.io/ephs23/pen/NeQZGx
- pen_title
- Social Media Icons hover effect
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
The social media icons hover effect by Ephraim Sangma creates a set of Font Awesome social media icons that animate on hover. Here's a breakdown of how it works and the key elements involved:
- a:before: Used to create a background color effect when hovering over the social media icons. It is initially positioned below the button. On hover, it slides up and fills the icon’s circle
- transform: rotateY: Rotates the icon in 360 degrees along the Y-axis, giving a flip effect
17. Interactive close button
code_snippet codepen
- pen_url
- https://codepen.io/mariusgnicula/pen/MpzOoP
- pen_title
- A simple but interactive close button
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
The interactive close button animation by Marius Nicula creates an interactive button with circular elements inside it that move and change colors on hover. It works with the following:
- SCSS transition mixin: Creates a consistent transition effect that applies to all properties
- transform: rotate: Rotates the bars diagonally (+45° and -45°) to give the “X” shape
- &:hover: The background color of the bars and the position of the circles in the bars change on hover
18. Icon hover effect
code_snippet codepen
- pen_url
- https://codepen.io/EngSafa/pen/MpPvea
- pen_title
- css Icon Hover Effect
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
Engineer’s icon hover effect completes the circular background of the icons on hover. It works with:
- border-radius: 50% (docs): Gives the list items their circular shape
- transform: rotate: Rotates each list item 45° to tilt the semicircles
- ::before: The half of the semicircle that remains static and visible
- ::after: The other half of the semicircle that slides in on hover
19. CSS social tiles
code_snippet codepen
- pen_url
- https://codepen.io/Stockin/pen/mzydLz
- pen_title
- 3D - CSS Social Tiles
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
The CSS social tiles animation by Stockin uses CSS to create titled 3D buttons that “levitate” in the air on hover. It relies on the following to work:
- CSS transforms (skew(25deg) and rotate(-30deg)): Create the tilted card effect
- box-shadow: Gives each item depth and a 3D effect
- ::before and ::after: Complete the 3D effect by acting as the “walls” of each item
- Hover effect: The item moves slightly to the right and up and the box shadow becomes larger and more pronounced, enhancing the 3D effect
20. Text and gradient icon hover effect
code_snippet codepen
- pen_url
- https://codepen.io/yxwang31/pen/NWYpdxx
- pen_title
- CSS Icon Hover Effects with Text And Gradient Drop Shadow
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
The text and gradient icon hover effect by Yixuan creates an animated navigation bar with expanding menu items and colorful hover effects. Here's a breakdown of how it works:
- ::before: Creates a gradient overlay that fades in on hover
- ::after: Generates a blurred glow around the button
- scale(0): Shrinks the icons when hovered upon
- scale(1): Scales up the title on hover to become visible
- li: Increases in width as the title appears
Link and menu CSS hover animations
Let’s explore some link and menu hover effects that can add flair to navigation bars.
21. Creative menu hover effect
code_snippet codepen
- pen_url
- https://codepen.io/abdelRhman345/pen/PXMmdv
- pen_title
- Creative Menu Hover Effects #
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
The creative menu hover effect by abdel Rhman generates a navigation menu dynamically using Pug templating language. The CSS styles applied give the menu items a simple but eye-catching hover effect. Here's an explanation of how it works:
- :before: Creates the border lines that scale into view on hover
- :after: Creates the background that expands to cover the menu item on hover
22. Menu hover
code_snippet codepen
- pen_url
- https://codepen.io/larrygeams/pen/kPeXNw
- pen_title
- CSS3 Hover Effect using :after Psuedo Element
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
Each menu item in Larry Geams’ menu hover effect has a unique left-border color and when a user hovers over the links, the background color slides in to fill the links. This animation is powered by an ::after attached to each link. On hover, the width of ::after extends to 100%, making it fill its source element.
23. Magic line navbar
code_snippet codepen
- pen_url
- https://codepen.io/RockStarwind/pen/WmGwwp
- pen_title
- Pure CSS Magic Line Navbar
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
The Magic line navbar animation by Rock Starwind creates a sleek navigation bar with a dynamic hover effect. When a user hovers over any of the links, a line indicator slides to align with the hovered link. Here’s a breakdown of the animation:
- position: absolute and bottom: 0: Positions the line at the bottom of the nav bar
- opacity: Sets the default opacity of the line to 0 and transitions it to 1 on hover
- calc(): Calculates the size and position of the .line using the --index custom property based on the hovered link's position in the grid
- -index: Dynamically changes based on the hovered link to indicate which link is active and where the .line should move
- hover ~ .line: A sibling selector that updates the .line properties (like --index) based on which link is hovered
24. Wavy menu line
code_snippet codepen
- pen_url
- https://codepen.io/mburakerman/pen/xpZJYL
- pen_title
- Menu Hover Line Effect
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
The wavy menu line effect by Mehmet Burak Erman makes links stand out by giving them a wavy line that shows up to the party on hover. It works with:
- li:hover: Gives links a base64-encoded SVG line as their background-image
- @keyframes line: Animates the background's position horizontally on hover
25. Desktop menu animation
code_snippet codepen
- pen_url
- https://codepen.io/Mareken/pen/rRyQEo
- pen_title
- [Pure CSS] Desktop Menu Animation
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
There’s a lot going on with the desktop menu animation by Gabriel Antonio. Let’s explore how it works.
- translateY: Moves the position of the top and bottom bars of the hamburger menu on hover
- opacity: Hides the top and bottom hamburger menu bars on hover
- scaleY: Increases the size of the middle hamburger menu bar on hover
- translateX: Slides the menu out from the left side when users hover over the hamburger menu
- translateY, rotate(-90deg), and opacity: Rotates the “MENU” text into view and makes it visible on hover
- nth-of-type: Creates staggering delays for the menu items, so they animate into view one after the other
Button CSS hover animations
Add character to your CTAs with these creative CSS button hover effects.
26. Don’t push me buttons
code_snippet codepen
- pen_url
- https://codepen.io/ahart814/pen/yLNMZGa
- pen_title
- Don't Push Me Buttons / CPC Color
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
The Don’t push me buttons animation by Alex Hart is a 2-for-1 package that comes with a hover animation and a click one. It works with the following:
- transform-style: preserve-3d: Gives the buttons a 3D-like appearance
- translate(0, 0.375em): Moves the buttons slightly downwards on hover to simulate a "press" effect
- transform: translate(0em, 0.75em): Simulates a complete button press when clicked by moving the button further down
27. Next button hover
code_snippet codepen
- pen_url
- https://codepen.io/folaad/pen/YvmRpz
- pen_title
- CSS BUTTON HOVER
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
The Next button hover by Imran Pardes displays the word "NEXT" in a bold, skewed background, accompanied by an animated arrow composed of three SVG paths. Here’s how it works
- transform: translateX: Places the first and 2nd paths of the arrow off-screen. This ensures they are initially hidden, then slide into view on hover
- @keyframes color_anim: Makes the arrow paths flash yellow periodically
- box-shadow: The shadow increases on hover, and its color changes to yellow
28. Sleepy birds button
code_snippet codepen
- pen_url
- https://codepen.io/ash_creator/pen/zYaZXLJ
- pen_title
- すやすやなボタン
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
The sleepy birds button by ash_creator is a wildly creative animation that pushes the boundaries of what’s possible with CSS. The birds in this project were all created with HTML and CSS. Initially, the birds are sleeping with there eyes closed, and when hovered over, 2 out of 3 of them wake up.
Let’s see what makes this animation tick:
- @keyframes sleep: Gives all characters a subtle breathing/pulsing animation by alternating the birds’ heights. This animation is constantly running on all birds
- @keyframes wakeup: Transitions the height of all characters on hover. Character expansion on hover
- @keyframes eye and @keyframes eye_2: Creates the blinking and eye movement animations that occur on hover
- @keyframes body_hoo: Character body movements
- @keyframes face_pen: Face scaling animations
- letter-spacing: Increases the letter spacing of the buttons’ texts on hover
- translateX, rotateY, and translateX: Animates the background of the buttons on hover
29. Rainbow button hover
code_snippet codepen
- pen_url
- https://codepen.io/althi/pen/eKdmaa
- pen_title
- Animated button with rainbow hover #pride
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
The rainbow button hover effect by Thiago Marques is colorful and mesmerizing. When a user hovers over the set of rainbow-colored buttons, a sliding gradient animation that transition through multiple colors occurs, giving the illusion of a moving rainbow background. This effect is powered by:
- @keyframes slidebg: Changes the background-position of the background gradients to simulate the moving rainbow effect on hover
- background-image: Defines the linear-gradient colors of each button
30. 3D blend mode buttons
code_snippet codepen
- pen_url
- https://codepen.io/lisilinhart/pen/OJRoRJe
- pen_title
- CSS 3D Blend Mode Buttons
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
The 3D blend mode buttons by Lisi, who drew inspiration from Oleg Frolov, have a 3D-look to it. When the user hovers over a button, it uses three layers of colors to create a wobble-like animation that gives the button a 3D-like appearance. This animation is powered by:
- perspective: Gives the buttons a 3D view
- transform: Creates the rotation effect
- @keyframes rotateAngle: Uses rotateY to rotate the main container on the Y-axis in a continuous loop
- @keyframes translateWobble: Applies the wobble effect to the button's ::before and ::after pseudo-elements on hover. It uses transform: translate3d to translate the element in all three axes (X, Y, Z)
- mix-blend-mode: Is set to color-dodge and causes the colors of the pseudo-elements to blend, creating a striking color contrast effect
blog_call_to_action default
- title
First time here? Discover what Prismic can do!
- description
Build locally with your preferred tech stack and spend less time fixing, and more time shipping.
- color
- blue
- image
- offset_image
- true
- cta_link
{ "link_type": "Web", "key": "6054acac-106e-4642-8738-28c210243ba2", "url": "https://prismic.io/dashboard/signup", "target": "" }- cta_label
- Get started now
- cta_type
- link
text_content default
- content
Image CSS hover animations
These image hover effects that turn visuals into interactive art.
31. Frame hover effect
code_snippet codepen
- pen_url
- https://codepen.io/t_afif/pen/JjLVLPL
- pen_title
- Frame hover effect with one element
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
The images in Temani Afif’s frame hover effect initially appear without a border/frame. However, when hovered over, a border appears, and the images become bright, almost as if a dark veil had been removed. The following properties are adjusted on hover to create this animation:
- outline: The outline covers the image by default. However, on hover, its thickness changes to a thinner value, creating the effect of a shrinking border
- outline-offset: Defines the gap between the image and the outline
32. Dual image effect
code_snippet codepen
- pen_url
- https://codepen.io/t_afif/pen/LYdqGKQ
- pen_title
- Dual image with hover effect
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
Temani Afif’s dual image effect gives a diagonally-split box with an image on either side. When the image on the left corner is hovered over, it fills 75% of the screen. The same goes for the image on the r right corner. This dynamic “sliding triangle reveal” animation relies on:
- clip-path: Defines triangular regions of the images
- --_p CSS variable in clip-path: Dynamically adjusts the size and position of the clipping polygon on hover. This causes the triangular regions to grow or shrink, revealing more or less of the images
33. Image hover effect
code_snippet codepen
- pen_url
- https://codepen.io/ig_design/pen/WNrWezW
- pen_title
- Image Hover Effect - pure css - #18
- default_tab
- result
- pen_height
- 500
- pen_editable
- false
- preview
- false
text_content default
- content
When the user hovers over a specific image in the image hover effect created by Ivan Grozdic, all other images become dim (opacity: 0.1) while the hovered one remains fully visible (opacity: 1).
Simultaneously, the image scales up and rotates 3° while a masked text corresponding to the image appears at the center of the screen.
This animation works with:
- opacity: Controls the opacity of the images on hover
- scale and rotate: Create a zoom effect when an image is hovered on hover
- scale: scales up the text on hover
- mix-blend-mode: difference: Applies the masking effect to the text so it adapts to its background
34. Gallery hover effect
code_snippet codepen
- pen_url
- https://codepen.io/bobbykorec/pen/yLgRwRx
- pen_title
- Gallery Hover Effect
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
In the gallery hover effect by Bobby Korec, the image zooms in on hover while the header text slides upwards and scales down, creating a clean and visually engaging effect. It works with:
- transform: scale(2): Enlarges the image on hover, creating a zoom effect
- bottom: 300px and transform: scale(.4): Scales the text down on hover and moves its position to create an upward sliding effect
35. Masking hover rays
code_snippet codepen
- pen_url
- https://codepen.io/thebabydino/pen/YzppPmm
- pen_title
- Hover rays with masking and Houdini magic (Chromium only)
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
The masking hover rays effect by Ana Tudor creates a dynamic effect on an image, where a series of gradients and masks are used to create other “images” that extend out of the original on hover. It resembles a squid’s tentacles extending outward and works with:
- mask: Applies multiple radial and linear gradients that control the areas where the image is visible and masked
- filter: grayScale: Gives the image a gray scale effect that changes on hover
Five other creative CSS hover effects I particularly liked
Lastly, let’s explore five more hover animations that don’t fit into any one category but I found to be really engaging.
36. Scotch VHS
code_snippet codepen
- pen_url
- https://codepen.io/BlurSoulx/pen/zYXJqMy
- pen_title
- Scotch VHS CSS
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
The Scotch VHS homepage effect by BlurSoulx spices up a product homepage with five types of animations:
- Subtle entrance animation: Creates a fade-in effect when the page loads. It relies on @keyframes spawn to animate the page’s opacity from 0 to 1 and give the page a growing box-shadow
- Sphere hover effect: A range of background gradient changes, box shadow effects, and scale up effects are applied to the buttons and links on hover
- Navigation link hover effects: The links and CTAs have various hover effects
- Animated GIF texture effect: Applies an animated GIF texture to the main container’s ::after pseudo-element on hover. It uses mix-blend-mode: screen to make the effect more colorful
37. All but me
code_snippet codepen
- pen_url
- https://codepen.io/seyedi/pen/RwdrMYw
- pen_title
- All-but-me query with :has()
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
The all-but-me blog page effect by Mojtaba Seyedi introduces an interactive hover effect on a grid of cards, where hovering over a single card highlights it by making the other cards blur. It works with the following:
- :has() pseudo-class: Targets the parent .card-list to detect if any li child is being hovered (:has(li:hover)). It ensures the blur effect only applies when a hover event occurs
- :not() pseudo-class: Used to exclude the hovered card (li:not(:hover)) from the blur effect
- filter: blur(): Applies a blur filter (blur(4px)) to the non-hovered cards to de-emphasize them. This makes the hovered card stand out from the crowd
38. Cubes hover effect
code_snippet codepen
- pen_url
- https://codepen.io/gvissing/pen/QWBrzdB
- pen_title
- CSS Only Cubes Hover Effects @ OnlineTutorialsYT
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
The cubes hover effect by Greg Vissing creates a dynamic 3D-like effect where stacked cubes rotate through various color hues on hover, giving the structure an eye-catching, colorful transition effect. It works with:
- @keyframes animate: Applies a hue-rotate filter over the .container, creating a smooth color transition that loops infinitely over 5 seconds
- translate(): Gives the structure its 3D-like positioning
- :before and :after: Create the side and top surfaces for the cubes
39. Inward shadow
code_snippet codepen
- pen_url
- https://codepen.io/smashingmag/pen/abPOwRm
- pen_title
- Inward Shadow Pt. 2
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
The inward shadow effect by Smashing Magazine creates an interactive and colorful overlay effect where three circular elements representing news publications transform on hover to reveal their logos. Its powered by:
- box-shadow: Gives the circles the initial subtle shadow
- .item:hover: Makes the text transparent and transitions the box shadow, revealing the logo within
40. X-ray
code_snippet codepen
- pen_url
- https://codepen.io/josetxu/pen/yLqWogR
- pen_title
- X-Ray - Pure CSS
- default_tab
- result
- pen_height
- 500
- pen_editable
- true
- preview
- false
text_content default
- content
Last but not least is the X-ray effect by Josetxu, which is simply mind-blowing. This animation shows an X-ray of the human body on hover. There are also two buttons for toggling between full body view and full X-ray view. The CSS powering this animation is long and quite complex, but some of the key things powering it are:
- @keyframes startup-scaner: Controls the initial movement of the scanner overlay during the startup sequence
- @keyframes startup-skeleton: Gradually reveals the skeleton layer during the startup animation
- clip-path: Masks and reveals the skeleton in sync with the scanning zones, creating dynamic effects as users interact
text_content default
- content
Hover animation tools and libraries you should know
Hover.css
Hover.css is a collection of CSS-powered hover effects that you can apply to images, links, SVGs, buttons, and more. It is a lightweight library that weighs 6.7kb (minified + gzipped).
Hover.css provides over 110 animation effects for animating CSS properties like background colors, borders, shadows, and icons.

Mocassin.css
Mocassin.css provides a collection of 20+ hover effects for captions. It is designed to enhance user interactions with visually appealing animations and transitions. The library is easy to use and doesn’t require extensive customization or setup.

iHover
iHover is a collection of 20 hover effects that you can apply to your website. The library is built on SCSS and is compatible with CSS frameworks like Bootstrap.

text_content default
- content
Conclusion
Adding hover animations to your website is a great way to give visitors a more engaging and interactive user experience. Whether you're enhancing buttons, images, text, or other elements, these animations can add personality and depth to your designs, leaving a stronger impression.
We trust you’ve gained inspiration from the CSS hover animations we’ve explored in this article. Keep coding and remember to share what you build with the Prismic team!
related_posts default
- title
You might also like...
Document data
{
"title": [
{
"type": "heading1",
"text": "CSS Hover Effects: 40 Engaging Animations To Try",
"spans": [],
"direction": "ltr"
}
],
"image": {
"dimensions": {
"width": 517,
"height": 290
},
"alt": null,
"copyright": null,
"url": "https://prismic-main.cdn.prismic.io/prismic-main/Z1kre5bqstJ98SVB_css.svg",
"id": "Z1kre5bqstJ98SVB",
"edit": {
"x": 0,
"y": 0,
"zoom": 1,
"background": "transparent"
}
},
"author": {
"id": "ZO8HtREAACwARj9Q",
"type": "blog_author",
"tags": [],
"lang": "en-eu",
"slug": "nefe-emadamerho-atori",
"first_publication_date": "2023-08-30T09:19:09+0000",
"last_publication_date": "2023-08-30T09:53:41+0000",
"uid": "nefe-emadamerho-atori",
"link_type": "Document",
"key": "47920b17-ae08-4b71-810f-1784b0755093",
"isBroken": false
},
"additional_author": {
"link_type": "Document"
},
"category": {
"id": "ZO8HtREAACwARj4c",
"type": "blog_category",
"tags": [],
"lang": "en-eu",
"slug": "performance--ux",
"first_publication_date": "2023-08-30T09:19:09+0000",
"last_publication_date": "2026-04-22T11:49:05+0000",
"uid": "performance-and-ux",
"link_type": "Document",
"key": "9ca37d20-7c32-4fdb-ae2b-090fd2a01969",
"isBroken": false
},
"date": "2025-11-30",
"updated_date": null,
"learning_objective": null,
"card_description": [],
"slices": [
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "Don’t come for my head, but I think it’s safe to say that static websites are officially a thing of the past. People nowadays expect some level of interactivity when they visit websites. One of the ways you can keep them engaged is by adding hover animations to your websites.",
"spans": [
{
"start": 0,
"end": 22,
"type": "em"
},
{
"start": 0,
"end": 22,
"type": "strong"
}
],
"direction": "ltr"
},
{
"type": "paragraph",
"text": "There’s no limit to the type of hover animation you could make. It could be a simple button that scales up on hover or a card that flips over 3D-style — the possibilities are endless.",
"spans": [],
"direction": "ltr"
},
{
"type": "paragraph",
"text": "In this article, we will explore 40 examples of CSS hover animations—ten of which I created myself 🙃. Hopefully, these examples help you draw inspiration and give you ideas for how to keep users engaged and provide them with a memorable experience. Let’s dive in.",
"spans": [],
"direction": "ltr"
},
{
"type": "heading2",
"text": "40 examples of CSS hover animations",
"spans": [],
"direction": "ltr"
},
{
"type": "paragraph",
"text": "Let’s start by taking a look at ten custom animations I personally created, complete with demos and code examples!",
"spans": [],
"direction": "ltr"
},
{
"type": "heading2",
"text": "Custom CSS hover effects",
"spans": [],
"direction": "ltr"
},
{
"type": "heading3",
"text": "1. Holographic card",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$5352490c-d774-4608-bdaa-a4d736ac9e9a",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/nefejames/pen/ogvNgJq",
"pen_title": "Holographic card",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$2991bf7e-5588-424f-933c-b69942cb3995",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "As they say, you can’t beat the classics. So, we’re starting with a simple card effect where it scales up, gets a colorful border shadow, and shimmers with a holographic gradient on hover. This animation works with:",
"spans": [],
"direction": "ltr"
},
{
"type": "list-item",
"text": "::before pseudo-element: Creates the holographic effect by placing a gradient background with varying opacity and rotation. It initially has 0 opacity, and on hover, it becomes visible while moving downwards",
"spans": [
{
"start": 0,
"end": 8,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 141,
"end": 142,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": ".holographic-card:hover: Applies a scale effect (transform: scale(1.05)) and a glowing box shadow (box-shadow: 0 0 20px rgba(0, 255, 255, 0.5))",
"spans": [
{
"start": 0,
"end": 23,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 49,
"end": 71,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 99,
"end": 142,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "2. Liquid morph",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$75cfed15-7ec6-4a8d-89c7-22853a8dca9e",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/nefejames/pen/WbeNvrr",
"pen_title": "Liquid morph",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$fe0842f1-02a4-46cf-8c72-b5f9ab74d174",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "This animation creates a liquid-like morphing effect on a button when hovered over. Initially, the button has a rounded rectangular shape with a dark blue background and a centered text label. When hovered, the button slightly rotates, its border-radius decreases, and a colorful, conic gradient appears. The CSS features powering this animation include:",
"spans": [],
"direction": "ltr"
},
{
"type": "list-item",
"text": "::before pseudo-element: Creates a conic gradient background, which transitions from cyan to dark blue, giving the appearance of a liquid filling the button",
"spans": [
{
"start": 0,
"end": 8,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": ".liquid-morph-element:hover: Reduces the border-radius to 10px and applies a rotation of 15deg, giving the button a more angular shape",
"spans": [
{
"start": 0,
"end": 27,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 58,
"end": 62,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 89,
"end": 94,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "3. Explosive text effect",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$c0c863f0-befc-4d50-a590-381548634060",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/nefejames/pen/XJrWbKz",
"pen_title": "Particle deconstruction",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$15aa7505-4f1d-4c84-a7c9-fba94904a5b8",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "This animation creates an \"explosive\" effect when the element is hovered over. It works with the ::before and ::after pseudo-elements, which produces the radial gradient effect and scale up and rotate on hover.",
"spans": [
{
"start": 97,
"end": 105,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 110,
"end": 117,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "4. Text underline",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$da57a738-67e8-4de3-bfd7-3271b9f6aae7",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/nefejames/pen/qEWBOBz",
"pen_title": "Text hover underline",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$b0423f17-05fd-46e1-b03b-3ee4ecb6bc30",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "This animation creates a unique hover effect where underlines appear above and below the text when the user hovers over it. Its powered by the ::before and ::after pseudo-elements, which create the underline effect. The pseudo-elements grow from 0 to 100% on hover while a gradient is applied to them.",
"spans": [
{
"start": 143,
"end": 151,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 156,
"end": 163,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 246,
"end": 247,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 251,
"end": 255,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "5. Dropdown menu",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$6a1647a0-891c-4626-baa4-05a4d55d9bfd",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/nefejames/pen/yyBNogQ",
"pen_title": "Dropdown menu",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$8af20686-f769-41ac-bb9a-d0605d2dc4c5",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "This animation creates a dropdown menu that appears when hovering over a button. Initially, the dropdown menu is hidden, with its opacity set to 0, but becomes fully visible on hover. The key to this animation is the opacity, which is set to 1 on hover and transform: translateY(0), which moves the menu to its normal position.",
"spans": [
{
"start": 145,
"end": 146,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 217,
"end": 224,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 242,
"end": 243,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 257,
"end": 281,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "6. Double-sided card",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$46bc402f-93bf-472f-b219-506622ed534d",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/nefejames/pen/RNbPZpp",
"pen_title": "Double-sided card",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$d114482e-d9d1-4b35-bb8c-ce9e0fd93fc8",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "This animation creates a 3D flipping card effect. When the user hovers over the card, it rotates 180 degrees along the Y-axis, revealing the back side. The front and back sides of the card are identical in size but have different backgrounds and the perspective property on the cards’ container enhances the 3D effect.",
"spans": [
{
"start": 250,
"end": 261,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "paragraph",
"text": "This animation works with:",
"spans": [],
"direction": "ltr"
},
{
"type": "list-item",
"text": "transform-style: preserve-3d: Allows the cards to maintain their 3D position during rotation",
"spans": [
{
"start": 0,
"end": 28,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "transform: rotateY(180deg): Rotates the cards along the Y-axis",
"spans": [
{
"start": 0,
"end": 26,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "7. 4-corner image",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$ede64b09-851e-4a72-9ebb-eb8dd4e55fec",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/nefejames/pen/azoOyyz",
"pen_title": "4-corner image",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$a4aa8276-239a-4b60-8f40-c8e1f9771940",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "This animation creates an interactive image effect where the image is divided into four quadrants on hover. The quadrants represent a different section of an image, and they are positioned to create a complete picture when assembled. Upon hovering over the container, the quadrants shift outward, creating the split effect.",
"spans": [],
"direction": "ltr"
},
{
"type": "paragraph",
"text": "It works with:",
"spans": [],
"direction": "ltr"
},
{
"type": "list-item",
"text": "background-image: url() applies the image to each quadrant",
"spans": [
{
"start": 0,
"end": 23,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "background-position crops specific quadrants of the image",
"spans": [
{
"start": 0,
"end": 19,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "transform: translate() moves quadrants outwards on hover",
"spans": [
{
"start": 0,
"end": 22,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "8. Cursor animations",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$6b082047-287d-4153-89f5-11bc9b8bdb94",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/nefejames/pen/emONEew",
"pen_title": "Cursor animations 1",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$763fc116-1572-4b5b-9c73-2a83ee1a9372",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "This animation has two effects. First, it demonstrates various CSS cursor styles on hover, and each box undergoes different visual effects, like scaling, rotating, clipping, and pulsing. Here’s a breakdown of what powers the effects in this:",
"spans": [],
"direction": "ltr"
},
{
"type": "list-item",
"text": "cursor: Defines unique cursor types for the different boxes",
"spans": [
{
"start": 0,
"end": 6,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 16,
"end": 35,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://developer.mozilla.org/en-US/docs/Web/CSS/cursor",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "::before: Creates a linear gradient effect that moves diagonally from top-left to bottom-right on hover",
"spans": [
{
"start": 0,
"end": 8,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "@keyframes pulse: Creates a pulsating effect where the box grows and shrinks in size repeatedly",
"spans": [
{
"start": 0,
"end": 16,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "@keyframes shake: Simulates a shaking or jittery motion, like the kind used to signify \"error\" or \"not allowed\"",
"spans": [
{
"start": 0,
"end": 16,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "@keyframes moveAround: Causes the boxes to shift slightly in various directions",
"spans": [
{
"start": 0,
"end": 21,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "CSS transforms: transform: scale(), rotate(), translateY(), translateX(), and skew() are applied to various boxes",
"spans": [
{
"start": 16,
"end": 34,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 36,
"end": 44,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 46,
"end": 58,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 60,
"end": 72,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 78,
"end": 84,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "9. Rotating cube",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$a64e3fb3-9460-450f-85fd-83f2f3e52d56",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/nefejames/pen/gbYpxvX",
"pen_title": "Rotating cube",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$333c55a0-e13c-4f0a-97ff-c9e5448ae368",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "This 3D animation creates an interactive cube with six faces (front, back, right, left, top, and bottom), each styled with distinct colors and a subtle gradient.The cube rotates smoothly in 3D space when hovered over, and a glass-like gradient appears on the faces. It works with:",
"spans": [],
"direction": "ltr"
},
{
"type": "list-item",
"text": "translateZ, rotateX, and rotateY: Position the faces to form a cube",
"spans": [
{
"start": 0,
"end": 10,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 12,
"end": 19,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 25,
"end": 32,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "perspective and transform-style: preserve-3d: Ensure proper 3D rendering",
"spans": [
{
"start": 0,
"end": 11,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 16,
"end": 44,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "@keyframes rotate3d: Creates the continuous cube rotation",
"spans": [
{
"start": 0,
"end": 19,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "::before and ::after: Creates the glass-like reflections that occur on hover",
"spans": [
{
"start": 0,
"end": 8,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 13,
"end": 20,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "10. Chameleon SVG",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$3927a536-69a3-4408-ae29-8b46dd5c313a",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/nefejames/pen/jENPLzQ",
"pen_title": "Chameleon SVG",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$0239bb97-081b-417d-b3ba-747e69005c98",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "When hovered over, the card cycles through different SVG-based background patterns and shifts the pattern's position smoothly across the surface. It works with:",
"spans": [],
"direction": "ltr"
},
{
"type": "list-item",
"text": "background-image: Uses inline SVG data to display custom patterns",
"spans": [
{
"start": 0,
"end": 16,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "@keyframes move-and-color: Defines the stages of animation, specifying changes to background-image and background-position",
"spans": [
{
"start": 0,
"end": 25,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 82,
"end": 98,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 103,
"end": 122,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "paragraph",
"text": "That’s it for the custom CSS hover effects. Now, let’s move on to examples from other developers. We’ll start with checking out card hover animations; view this Codepen collection to see other text animations I created.",
"spans": [
{
"start": 151,
"end": 219,
"type": "em"
},
{
"start": 156,
"end": 179,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/collection/EPjRwB",
"target": "_blank"
}
}
],
"direction": "ltr"
}
]
},
"id": "text_content$6f885ccf-3953-4b73-80cb-3efe3b14d322",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "animated",
"version": "initial",
"items": [],
"primary": {
"title": [
{
"type": "heading2",
"text": "Build a site with interactive 3D hover effects!",
"spans": [],
"direction": "ltr"
}
],
"description": [
{
"type": "paragraph",
"text": "Take hover effects to the next level with 3D interactions. In this creative course, we build a customizer app and landing page with real-time animations using Next.js 15, GSAP, Prismic, Three.js, Tailwind, and TypeScript!",
"spans": [],
"direction": "ltr"
}
],
"cta_link": {
"link_type": "Web",
"key": "82365389-76dc-4aae-bf52-b34d638411e0",
"url": "https://prismic.io/courses/suburbia-skateboards"
},
"cta_label": "View Course",
"cta_type": "link",
"image": {
"dimensions": {
"width": 860,
"height": 480
},
"alt": "A GIF of Suburbia website",
"copyright": null,
"url": "https://images.prismic.io/prismic-main/aEDgmLh8WN-LVoE__Suburbia_hover.gif?auto=format,compress",
"id": "aEDgmLh8WN-LVoE_",
"edit": {
"x": 0,
"y": 0,
"zoom": 1,
"background": "transparent"
}
},
"color": "green"
},
"id": "blog_call_to_action$aff07f6f-0262-4917-a740-b4972237cbc9",
"slice_type": "blog_call_to_action",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "heading2",
"text": "Card CSS hover animations",
"spans": [],
"direction": "ltr"
},
{
"type": "paragraph",
"text": "These card hover animations add a unique effect that will grab the attention of your visitors’.",
"spans": [],
"direction": "ltr"
},
{
"type": "heading3",
"text": "11. Profile card hover",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$5eededf6-ded0-474f-b302-eb12bfde2a9e",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/codev_land/pen/yLXeyWX",
"pen_title": "Profile card Hover",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$7eb0b85b-1d22-41d0-8d9d-240bd00726a4",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "The profile card hover animation by Codev Land creates a two-layer sliding effect on a card component. When hovered, the top slide (with an icon) moves up to reveal the bottom slide containing text. This animation relies on:",
"spans": [
{
"start": 0,
"end": 32,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/codev_land/pen/yLXeyWX",
"target": "_blank"
}
},
{
"start": 36,
"end": 46,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/codev_land",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "transform: translateY() (docs): Moves each slide along the vertical axis during hover",
"spans": [
{
"start": 0,
"end": 23,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 25,
"end": 29,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/translate",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "transition (docs): Creates a smooth animation effect when both slides’ positions change on hover",
"spans": [
{
"start": 0,
"end": 10,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 12,
"end": 16,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://developer.mozilla.org/en-US/docs/Web/CSS/transition",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "12. CSS hard hover effects",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$45e20c85-cf6f-46ec-a023-ead602ccd4a4",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/obrunorocha/pen/aggLgE",
"pen_title": "CSS Card Hover Effects",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$d1afe380-1090-4b18-a18f-3389efb7ed2e",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "The CSS hard hover effects by Bruno Rocha creates a dynamic card hover effect, where top layer shrinks on hover to reveal the inner text-filled layer. The creator uses the transition property to add to the cards to animate changes in their height, border-radius, and font size during hover.",
"spans": [
{
"start": 4,
"end": 26,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/obrunorocha/pen/aggLgE",
"target": "_blank"
}
},
{
"start": 30,
"end": 41,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/obrunorocha",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "13. Glowing gradient glassmorphism card",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$9dab919a-fedf-4c07-9c0d-93f742dfa56b",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/kodplay/pen/oNBreRJ",
"pen_title": "Glowing Gradient Glassmorphism Card",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$0139949f-ca3b-48c2-a0b9-4d99c17bbc50",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "The Glowing gradient glassmorphism card by Kodplay creates a visually appealing card layout with a hover animation effect. Each card has a distinct style, with unique gradient backgrounds, blur effects, and hover interactions. Here's a breakdown of how the code works:",
"spans": [
{
"start": 4,
"end": 39,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/kodplay/pen/oNBreRJ",
"target": "_blank"
}
},
{
"start": 43,
"end": 50,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/kodplay",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "::before and ::after pseudo-elements: Creates gradient skewed backgrounds. On hover, the skew effect is removed, and the dimensions adjust",
"spans": [
{
"start": 0,
"end": 8,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 13,
"end": 20,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "transition: Animates the hover effects",
"spans": [
{
"start": 0,
"end": 10,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "span::before and span::after: Adds blur and glow effects on hover",
"spans": [
{
"start": 0,
"end": 12,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 17,
"end": 28,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "backdrop-filter (docs): Adds a glassmorphism effect to the card's content",
"spans": [
{
"start": 0,
"end": 15,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 17,
"end": 21,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "@keyframes animate: Creatives a slight vertical motion to give a dynamic floating effect",
"spans": [
{
"start": 0,
"end": 18,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "14. Tourist cards",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$0cba78b5-f99b-42dd-b414-cab6d0636ef5",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/kjawhar15/pen/zLBaPj",
"pen_title": "hovering cards",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$25766e65-207a-439d-a44f-d62f51c02086",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "The tourist cards hover effect by karim jawhar features three interactive cards, each showcasing the image of a landmark. When hovered over, the cards transform by rotating along the X and Z axes, giving them a 3D effect. This animation works with:",
"spans": [
{
"start": 4,
"end": 30,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/kjawhar15/pen/zLBaPj",
"target": "_blank"
}
},
{
"start": 34,
"end": 46,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/kjawhar15",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "transform: rotateX, rotateZ, translateY, and translateZ properties create the 3D rotation and positioning effect that occurs on hover",
"spans": [
{
"start": 0,
"end": 9,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 11,
"end": 18,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 20,
"end": 27,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 29,
"end": 39,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 45,
"end": 55,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "transition: Smoothens the change between states, especially on the transform and box-shadow, making the hover effect more fluid",
"spans": [
{
"start": 0,
"end": 10,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 67,
"end": 76,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 81,
"end": 91,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "15. Same height cards",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$5b53e475-3869-4fad-8655-d9f0601e76fe",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/veronicadev/pen/WJyOwG",
"pen_title": "FlexBox Exercise #4 - Same height cards",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$74ad51f2-8814-4b93-9160-a756eefabfc4",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "The same height cards animation by Veronica is another great example. When hovered over, the cards enlarge slightly and reveal more information about the items, such as a \"like\" icon and time information. At the same time, the image becomes partially opaque as its opacity reduces.",
"spans": [
{
"start": 4,
"end": 31,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/veronicadev/pen/WJyOwG",
"target": "_blank"
}
},
{
"start": 35,
"end": 43,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/veronicadev",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "paragraph",
"text": "This animation relies on:",
"spans": [],
"direction": "ltr"
},
{
"type": "list-item",
"text": "transform: scale: Enlarges the card on hover, making it appear to \"pop\" out",
"spans": [
{
"start": 0,
"end": 16,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "card__img--hover class: Handles the changes that occur on the background image when hovered. The image properties that change include opacity (docs), background-size (docs), and background-position (docs)",
"spans": [
{
"start": 0,
"end": 16,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 134,
"end": 141,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 143,
"end": 147,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://developer.mozilla.org/en-US/docs/Web/CSS/opacity",
"target": "_blank"
}
},
{
"start": 150,
"end": 165,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 167,
"end": 171,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://developer.mozilla.org/en-US/docs/Web/CSS/background-size",
"target": "_blank"
}
},
{
"start": 178,
"end": 197,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 199,
"end": 203,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://developer.mozilla.org/en-US/docs/Web/CSS/background-position",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "heading2",
"text": "Icon CSS hover effects",
"spans": [],
"direction": "ltr"
},
{
"type": "paragraph",
"text": "Let’s take a look at some icon hover effects that will be sure to make your website stand out.",
"spans": [],
"direction": "ltr"
},
{
"type": "heading3",
"text": "16. Social media icons hover effect",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$321560db-03dc-4ce3-a6ee-b9ff37b2aeb9",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/ephs23/pen/NeQZGx",
"pen_title": "Social Media Icons hover effect",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$437f5352-6088-470f-9f71-3c268284d7c4",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "The social media icons hover effect by Ephraim Sangma creates a set of Font Awesome social media icons that animate on hover. Here's a breakdown of how it works and the key elements involved:",
"spans": [
{
"start": 4,
"end": 35,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/ephs23",
"target": "_blank"
}
},
{
"start": 39,
"end": 53,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/ephs23/pen/NeQZGx",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "a:before: Used to create a background color effect when hovering over the social media icons. It is initially positioned below the button. On hover, it slides up and fills the icon’s circle",
"spans": [
{
"start": 0,
"end": 8,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "transform: rotateY: Rotates the icon in 360 degrees along the Y-axis, giving a flip effect",
"spans": [
{
"start": 0,
"end": 18,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "17. Interactive close button",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$06635031-a859-4873-8fb5-96538778c7f8",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/mariusgnicula/pen/MpzOoP",
"pen_title": "A simple but interactive close button",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$a506d31e-48c2-42c7-bfc3-93d12189e0b7",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "The interactive close button animation by Marius Nicula creates an interactive button with circular elements inside it that move and change colors on hover. It works with the following:",
"spans": [
{
"start": 4,
"end": 28,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/mariusgnicula/pen/MpzOoP",
"target": "_blank"
}
},
{
"start": 42,
"end": 55,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/mariusgnicula",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "SCSS transition mixin: Creates a consistent transition effect that applies to all properties",
"spans": [
{
"start": 5,
"end": 15,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 16,
"end": 21,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://sass-lang.com/documentation/at-rules/mixin/",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "transform: rotate: Rotates the bars diagonally (+45° and -45°) to give the “X” shape",
"spans": [
{
"start": 0,
"end": 17,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "&:hover: The background color of the bars and the position of the circles in the bars change on hover",
"spans": [
{
"start": 0,
"end": 7,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "18. Icon hover effect",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$269908ae-faf9-4605-aa1e-236f2ebd2879",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/EngSafa/pen/MpPvea",
"pen_title": "css Icon Hover Effect",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$fcec40ec-4448-4bcc-b53c-1e86037458e8",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "Engineer’s icon hover effect completes the circular background of the icons on hover. It works with:",
"spans": [
{
"start": 0,
"end": 10,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/EngSafa",
"target": "_blank"
}
},
{
"start": 11,
"end": 28,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/EngSafa/pen/MpPvea",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "border-radius: 50% (docs): Gives the list items their circular shape",
"spans": [
{
"start": 0,
"end": 18,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 20,
"end": 24,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "transform: rotate: Rotates each list item 45° to tilt the semicircles",
"spans": [
{
"start": 0,
"end": 17,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "::before: The half of the semicircle that remains static and visible",
"spans": [
{
"start": 0,
"end": 8,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "::after: The other half of the semicircle that slides in on hover",
"spans": [
{
"start": 0,
"end": 7,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "19. CSS social tiles",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$f3d2770d-9ac1-4247-8a42-da6b94c051f5",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/Stockin/pen/mzydLz",
"pen_title": "3D - CSS Social Tiles",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$2cec6d0c-4e2c-406e-b6ef-58d7c498e29e",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "The CSS social tiles animation by Stockin uses CSS to create titled 3D buttons that “levitate” in the air on hover. It relies on the following to work:",
"spans": [
{
"start": 4,
"end": 30,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/Stockin/pen/mzydLz",
"target": "_blank"
}
},
{
"start": 34,
"end": 41,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/Stockin",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "CSS transforms (skew(25deg) and rotate(-30deg)): Create the tilted card effect",
"spans": [
{
"start": 16,
"end": 27,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 32,
"end": 46,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "box-shadow: Gives each item depth and a 3D effect",
"spans": [
{
"start": 0,
"end": 10,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "::before and ::after: Complete the 3D effect by acting as the “walls” of each item",
"spans": [
{
"start": 0,
"end": 8,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 13,
"end": 20,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "Hover effect: The item moves slightly to the right and up and the box shadow becomes larger and more pronounced, enhancing the 3D effect",
"spans": [],
"direction": "ltr"
},
{
"type": "heading3",
"text": "20. Text and gradient icon hover effect",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$a36c07bf-85df-4e4e-931e-279d3177d8cf",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/yxwang31/pen/NWYpdxx",
"pen_title": "CSS Icon Hover Effects with Text And Gradient Drop Shadow",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$06357b35-744c-4600-968a-f344a13c687c",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "The text and gradient icon hover effect by Yixuan creates an animated navigation bar with expanding menu items and colorful hover effects. Here's a breakdown of how it works:",
"spans": [
{
"start": 4,
"end": 39,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/yxwang31/pen/NWYpdxx",
"target": "_blank"
}
},
{
"start": 43,
"end": 49,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/yxwang31",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "::before: Creates a gradient overlay that fades in on hover",
"spans": [
{
"start": 0,
"end": 8,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "::after: Generates a blurred glow around the button",
"spans": [
{
"start": 0,
"end": 7,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "scale(0): Shrinks the icons when hovered upon",
"spans": [
{
"start": 0,
"end": 8,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "scale(1): Scales up the title on hover to become visible",
"spans": [
{
"start": 0,
"end": 8,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "li: Increases in width as the title appears",
"spans": [
{
"start": 0,
"end": 2,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading2",
"text": "Link and menu CSS hover animations",
"spans": [],
"direction": "ltr"
},
{
"type": "paragraph",
"text": "Let’s explore some link and menu hover effects that can add flair to navigation bars.",
"spans": [],
"direction": "ltr"
},
{
"type": "heading3",
"text": "21. Creative menu hover effect",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$24b9c8ec-b14a-4189-bf09-a2d88c0b8edf",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/abdelRhman345/pen/PXMmdv",
"pen_title": "Creative Menu Hover Effects #",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$35b777b9-9680-412f-8ef3-374e365117d9",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "The creative menu hover effect by abdel Rhman generates a navigation menu dynamically using Pug templating language. The CSS styles applied give the menu items a simple but eye-catching hover effect. Here's an explanation of how it works:",
"spans": [
{
"start": 4,
"end": 30,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/abdelRhman345/pen/PXMmdv",
"target": "_blank"
}
},
{
"start": 34,
"end": 45,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/abdelRhman345",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": ":before: Creates the border lines that scale into view on hover",
"spans": [
{
"start": 0,
"end": 7,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": ":after: Creates the background that expands to cover the menu item on hover",
"spans": [
{
"start": 0,
"end": 6,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "22. Menu hover",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$fa96d936-921b-4a5a-b79c-fed91a53f3ac",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/larrygeams/pen/kPeXNw",
"pen_title": "CSS3 Hover Effect using :after Psuedo Element",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$709a9922-9f37-44b8-a917-aa8ca0e5c257",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "Each menu item in Larry Geams’ menu hover effect has a unique left-border color and when a user hovers over the links, the background color slides in to fill the links. This animation is powered by an ::after attached to each link. On hover, the width of ::after extends to 100%, making it fill its source element.",
"spans": [
{
"start": 18,
"end": 29,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/larrygeams",
"target": "_blank"
}
},
{
"start": 31,
"end": 48,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/larrygeams/pen/kPeXNw",
"target": "_blank"
}
},
{
"start": 201,
"end": 208,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 255,
"end": 262,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "23. Magic line navbar",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$573374c0-85f9-4b36-9a41-90e2f9c004d5",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/RockStarwind/pen/WmGwwp",
"pen_title": "Pure CSS Magic Line Navbar",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$d1a9b7ce-bfbd-4fbf-823a-a803d903e2cf",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "The Magic line navbar animation by Rock Starwind creates a sleek navigation bar with a dynamic hover effect. When a user hovers over any of the links, a line indicator slides to align with the hovered link. Here’s a breakdown of the animation:",
"spans": [
{
"start": 4,
"end": 21,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/RockStarwind/pen/WmGwwp",
"target": "_blank"
}
},
{
"start": 35,
"end": 48,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/RockStarwind",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "position: absolute and bottom: 0: Positions the line at the bottom of the nav bar",
"spans": [
{
"start": 0,
"end": 18,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 23,
"end": 32,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "opacity: Sets the default opacity of the line to 0 and transitions it to 1 on hover",
"spans": [
{
"start": 0,
"end": 7,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 49,
"end": 50,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 73,
"end": 74,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "calc(): Calculates the size and position of the .line using the --index custom property based on the hovered link's position in the grid",
"spans": [
{
"start": 0,
"end": 6,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 48,
"end": 53,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 64,
"end": 71,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 72,
"end": 87,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://developer.mozilla.org/en-US/docs/Web/CSS/--*",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "-index: Dynamically changes based on the hovered link to indicate which link is active and where the .line should move",
"spans": [
{
"start": 0,
"end": 6,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 101,
"end": 106,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "hover ~ .line: A sibling selector that updates the .line properties (like --index) based on which link is hovered",
"spans": [
{
"start": 0,
"end": 13,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 51,
"end": 56,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 74,
"end": 81,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "24. Wavy menu line",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$d0fa0c0c-86a3-4592-a632-01c221b4fd16",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/mburakerman/pen/xpZJYL",
"pen_title": "Menu Hover Line Effect",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$6a6df18c-4e9a-451e-85cc-578d2ac0d5d8",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "The wavy menu line effect by Mehmet Burak Erman makes links stand out by giving them a wavy line that shows up to the party on hover. It works with:",
"spans": [
{
"start": 4,
"end": 18,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/mburakerman/pen/xpZJYL",
"target": "_blank"
}
},
{
"start": 29,
"end": 47,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/mburakerman",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "li:hover: Gives links a base64-encoded SVG line as their background-image",
"spans": [
{
"start": 0,
"end": 8,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 57,
"end": 73,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "@keyframes line: Animates the background's position horizontally on hover",
"spans": [
{
"start": 0,
"end": 15,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "25. Desktop menu animation",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$47334fa1-63b7-4e4d-a27e-497159ff76df",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/Mareken/pen/rRyQEo",
"pen_title": "[Pure CSS] Desktop Menu Animation",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$8d0ec655-44f9-45de-83f8-972c63f81c9f",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "There’s a lot going on with the desktop menu animation by Gabriel Antonio. Let’s explore how it works.",
"spans": [
{
"start": 32,
"end": 54,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/Mareken/pen/rRyQEo",
"target": "_blank"
}
},
{
"start": 58,
"end": 73,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/Mareken",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "translateY: Moves the position of the top and bottom bars of the hamburger menu on hover",
"spans": [
{
"start": 0,
"end": 10,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "opacity: Hides the top and bottom hamburger menu bars on hover",
"spans": [
{
"start": 0,
"end": 7,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "scaleY: Increases the size of the middle hamburger menu bar on hover",
"spans": [
{
"start": 0,
"end": 6,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "translateX: Slides the menu out from the left side when users hover over the hamburger menu",
"spans": [
{
"start": 0,
"end": 10,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "translateY, rotate(-90deg), and opacity: Rotates the “MENU” text into view and makes it visible on hover",
"spans": [
{
"start": 0,
"end": 10,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 12,
"end": 26,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 32,
"end": 39,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "nth-of-type: Creates staggering delays for the menu items, so they animate into view one after the other",
"spans": [
{
"start": 0,
"end": 11,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading2",
"text": "Button CSS hover animations",
"spans": [],
"direction": "ltr"
},
{
"type": "paragraph",
"text": "Add character to your CTAs with these creative CSS button hover effects.",
"spans": [
{
"start": 22,
"end": 26,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://prismic.io/blog/call-to-action-examples",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "26. Don’t push me buttons",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$2f2d7cc8-924d-4d28-b805-a18db2cd3db7",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/ahart814/pen/yLNMZGa",
"pen_title": "Don't Push Me Buttons / CPC Color",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$b59d564c-7566-4cae-91aa-fd80548932b3",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "The Don’t push me buttons animation by Alex Hart is a 2-for-1 package that comes with a hover animation and a click one. It works with the following:",
"spans": [
{
"start": 4,
"end": 25,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/ahart814/pen/yLNMZGa",
"target": "_blank"
}
},
{
"start": 39,
"end": 48,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/ahart814",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "transform-style: preserve-3d: Gives the buttons a 3D-like appearance",
"spans": [
{
"start": 0,
"end": 28,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "translate(0, 0.375em): Moves the buttons slightly downwards on hover to simulate a \"press\" effect",
"spans": [
{
"start": 0,
"end": 21,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "transform: translate(0em, 0.75em): Simulates a complete button press when clicked by moving the button further down",
"spans": [
{
"start": 0,
"end": 33,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "27. Next button hover",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$da43521e-cb2a-4954-a377-63f16a9a3128",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/folaad/pen/YvmRpz",
"pen_title": "CSS BUTTON HOVER",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$94b58a16-82a9-4ef7-8ab7-350b55230d6c",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "The Next button hover by Imran Pardes displays the word \"NEXT\" in a bold, skewed background, accompanied by an animated arrow composed of three SVG paths. Here’s how it works",
"spans": [
{
"start": 4,
"end": 21,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/folaad/pen/YvmRpz",
"target": "_blank"
}
},
{
"start": 25,
"end": 37,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/folaad",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "transform: translateX: Places the first and 2nd paths of the arrow off-screen. This ensures they are initially hidden, then slide into view on hover",
"spans": [
{
"start": 0,
"end": 21,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "@keyframes color_anim: Makes the arrow paths flash yellow periodically",
"spans": [
{
"start": 0,
"end": 21,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "box-shadow: The shadow increases on hover, and its color changes to yellow",
"spans": [
{
"start": 0,
"end": 10,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "28. Sleepy birds button",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$41cd6856-420f-4bde-8c94-b2726b42e12b",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/ash_creator/pen/zYaZXLJ",
"pen_title": "すやすやなボタン",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$7ceb386c-57e8-4188-aaaf-fe897d15f99b",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "The sleepy birds button by ash_creator is a wildly creative animation that pushes the boundaries of what’s possible with CSS. The birds in this project were all created with HTML and CSS. Initially, the birds are sleeping with there eyes closed, and when hovered over, 2 out of 3 of them wake up.",
"spans": [
{
"start": 4,
"end": 23,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/ash_creator/pen/zYaZXLJ",
"target": "_blank"
}
},
{
"start": 27,
"end": 38,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/ash_creator",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "paragraph",
"text": "Let’s see what makes this animation tick:",
"spans": [],
"direction": "ltr"
},
{
"type": "list-item",
"text": "@keyframes sleep: Gives all characters a subtle breathing/pulsing animation by alternating the birds’ heights. This animation is constantly running on all birds",
"spans": [
{
"start": 0,
"end": 16,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "@keyframes wakeup: Transitions the height of all characters on hover. Character expansion on hover",
"spans": [
{
"start": 0,
"end": 17,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "@keyframes eye and @keyframes eye_2: Creates the blinking and eye movement animations that occur on hover",
"spans": [
{
"start": 0,
"end": 14,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 19,
"end": 35,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "@keyframes body_hoo: Character body movements",
"spans": [
{
"start": 0,
"end": 19,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "@keyframes face_pen: Face scaling animations",
"spans": [
{
"start": 0,
"end": 19,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "letter-spacing: Increases the letter spacing of the buttons’ texts on hover",
"spans": [
{
"start": 0,
"end": 14,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "translateX, rotateY, and translateX: Animates the background of the buttons on hover",
"spans": [
{
"start": 0,
"end": 10,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 12,
"end": 19,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 25,
"end": 35,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "29. Rainbow button hover",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$528b6511-df5d-46c1-b86e-6ac967498fb1",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/althi/pen/eKdmaa",
"pen_title": "Animated button with rainbow hover #pride",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$7d56fe7b-4664-44a3-ba16-1f152efdb375",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "The rainbow button hover effect by Thiago Marques is colorful and mesmerizing. When a user hovers over the set of rainbow-colored buttons, a sliding gradient animation that transition through multiple colors occurs, giving the illusion of a moving rainbow background. This effect is powered by:",
"spans": [
{
"start": 4,
"end": 24,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/althi/pen/eKdmaa",
"target": "_blank"
}
},
{
"start": 35,
"end": 49,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/althi/pen/eKdmaa",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "@keyframes slidebg: Changes the background-position of the background gradients to simulate the moving rainbow effect on hover",
"spans": [
{
"start": 0,
"end": 18,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 32,
"end": 51,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "background-image: Defines the linear-gradient colors of each button",
"spans": [
{
"start": 0,
"end": 16,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 30,
"end": 45,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "30. 3D blend mode buttons",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$8cfb8d98-ee2d-48a5-863a-28929dad8276",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/lisilinhart/pen/OJRoRJe",
"pen_title": "CSS 3D Blend Mode Buttons",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$7b4eed54-06dd-417c-bfcc-ccd6838f421a",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "The 3D blend mode buttons by Lisi, who drew inspiration from Oleg Frolov, have a 3D-look to it. When the user hovers over a button, it uses three layers of colors to create a wobble-like animation that gives the button a 3D-like appearance. This animation is powered by:",
"spans": [
{
"start": 4,
"end": 25,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/lisilinhart/pen/OJRoRJe",
"target": "_blank"
}
},
{
"start": 29,
"end": 33,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/lisilinhart",
"target": "_blank"
}
},
{
"start": 61,
"end": 72,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://dribbble.com/shots/8582990-VR-Menu-Interaction",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "perspective: Gives the buttons a 3D view",
"spans": [
{
"start": 0,
"end": 11,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "transform: Creates the rotation effect",
"spans": [
{
"start": 0,
"end": 9,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "@keyframes rotateAngle: Uses rotateY to rotate the main container on the Y-axis in a continuous loop",
"spans": [
{
"start": 0,
"end": 22,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 29,
"end": 36,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "@keyframes translateWobble: Applies the wobble effect to the button's ::before and ::after pseudo-elements on hover. It uses transform: translate3d to translate the element in all three axes (X, Y, Z)",
"spans": [
{
"start": 0,
"end": 26,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 70,
"end": 78,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 83,
"end": 91,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 125,
"end": 147,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "mix-blend-mode: Is set to color-dodge and causes the colors of the pseudo-elements to blend, creating a striking color contrast effect",
"spans": [
{
"start": 0,
"end": 14,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 26,
"end": 37,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
}
]
},
"id": "text_content$1914fb90-46f1-486f-91eb-f4394e7bb3b2",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "default",
"version": "initial",
"items": [],
"primary": {
"title": [
{
"type": "heading2",
"text": "First time here? Discover what Prismic can do!",
"spans": [],
"direction": "ltr"
}
],
"description": [
{
"type": "paragraph",
"text": "Build locally with your preferred tech stack and spend less time fixing, and more time shipping.",
"spans": [],
"direction": "ltr"
}
],
"color": "blue",
"image": {
"dimensions": {
"width": 527,
"height": 298
},
"alt": null,
"copyright": null,
"url": "https://prismic-main.cdn.prismic.io/prismic-main/e5928876-50cb-4f41-b44e-8d79ecc59876_cta_image.svg",
"id": "ZZ3vwBIAACwADCb_",
"edit": {
"x": 0,
"y": 0,
"zoom": 1,
"background": "transparent"
}
},
"offset_image": true,
"cta_link": {
"link_type": "Web",
"key": "6054acac-106e-4642-8738-28c210243ba2",
"url": "https://prismic.io/dashboard/signup",
"target": ""
},
"cta_label": "Get started now",
"cta_type": "link"
},
"id": "blog_call_to_action$e2f15e93-2b53-414f-afae-271fa7e85b51",
"slice_type": "blog_call_to_action",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "heading2",
"text": "Image CSS hover animations",
"spans": [],
"direction": "ltr"
},
{
"type": "paragraph",
"text": "These image hover effects that turn visuals into interactive art.",
"spans": [],
"direction": "ltr"
},
{
"type": "heading3",
"text": "31. Frame hover effect",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$c0401481-b85f-46b5-892d-b82240823793",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/t_afif/pen/JjLVLPL",
"pen_title": "Frame hover effect with one element",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$36a4da8f-abc8-423a-a013-0c71e1985c06",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "The images in Temani Afif’s frame hover effect initially appear without a border/frame. However, when hovered over, a border appears, and the images become bright, almost as if a dark veil had been removed. The following properties are adjusted on hover to create this animation:",
"spans": [
{
"start": 14,
"end": 25,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/t_afif",
"target": "_blank"
}
},
{
"start": 28,
"end": 46,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/t_afif/pen/JjLVLPL",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "outline: The outline covers the image by default. However, on hover, its thickness changes to a thinner value, creating the effect of a shrinking border",
"spans": [
{
"start": 0,
"end": 7,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "outline-offset: Defines the gap between the image and the outline",
"spans": [
{
"start": 0,
"end": 14,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "32. Dual image effect",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$c76aab91-f88b-42bb-a047-e4e08b158f15",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/t_afif/pen/LYdqGKQ",
"pen_title": "Dual image with hover effect",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$5ab76b7d-02e5-42f8-97b5-6fb21ab1951f",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "Temani Afif’s dual image effect gives a diagonally-split box with an image on either side. When the image on the left corner is hovered over, it fills 75% of the screen. The same goes for the image on the r right corner. This dynamic “sliding triangle reveal” animation relies on:",
"spans": [
{
"start": 0,
"end": 11,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/t_afif/pen/LYdqGKQ",
"target": "_blank"
}
},
{
"start": 14,
"end": 31,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/t_afif/pen/LYdqGKQ",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "clip-path: Defines triangular regions of the images",
"spans": [
{
"start": 0,
"end": 9,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "--_p CSS variable in clip-path: Dynamically adjusts the size and position of the clipping polygon on hover. This causes the triangular regions to grow or shrink, revealing more or less of the images",
"spans": [
{
"start": 0,
"end": 4,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 21,
"end": 30,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "33. Image hover effect",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$da5674b2-1ea7-4d9a-9472-285f0892ca32",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/ig_design/pen/WNrWezW",
"pen_title": "Image Hover Effect - pure css - #18",
"default_tab": "result",
"pen_height": 500,
"pen_editable": false,
"preview": false
},
"id": "code_snippet$0b1545fc-a487-475b-82fd-f43d930a5113",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "When the user hovers over a specific image in the image hover effect created by Ivan Grozdic, all other images become dim (opacity: 0.1) while the hovered one remains fully visible (opacity: 1).",
"spans": [
{
"start": 50,
"end": 68,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/ig_design/pen/WNrWezW",
"target": "_blank"
}
},
{
"start": 80,
"end": 92,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/ig_design",
"target": "_blank"
}
},
{
"start": 123,
"end": 135,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 182,
"end": 192,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "paragraph",
"text": "Simultaneously, the image scales up and rotates 3° while a masked text corresponding to the image appears at the center of the screen.",
"spans": [
{
"start": 49,
"end": 50,
"type": "em"
},
{
"start": 49,
"end": 50,
"type": "strong"
}
],
"direction": "ltr"
},
{
"type": "paragraph",
"text": "This animation works with:",
"spans": [],
"direction": "ltr"
},
{
"type": "list-item",
"text": "opacity: Controls the opacity of the images on hover",
"spans": [
{
"start": 0,
"end": 7,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "scale and rotate: Create a zoom effect when an image is hovered on hover",
"spans": [
{
"start": 0,
"end": 5,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 10,
"end": 16,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "scale: scales up the text on hover",
"spans": [
{
"start": 0,
"end": 5,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "mix-blend-mode: difference: Applies the masking effect to the text so it adapts to its background",
"spans": [
{
"start": 0,
"end": 26,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "34. Gallery hover effect",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$4a8120b4-0c60-4d41-a32e-7dbab78c92a4",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/bobbykorec/pen/yLgRwRx",
"pen_title": "Gallery Hover Effect",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$ac62a46b-6474-4682-a0ab-f3eec20703e6",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "In the gallery hover effect by Bobby Korec, the image zooms in on hover while the header text slides upwards and scales down, creating a clean and visually engaging effect. It works with:",
"spans": [
{
"start": 7,
"end": 27,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/bobbykorec/full/yLgRwRx",
"target": "_blank"
}
},
{
"start": 31,
"end": 42,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/bobbykorec",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "transform: scale(2): Enlarges the image on hover, creating a zoom effect",
"spans": [
{
"start": 0,
"end": 19,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "bottom: 300px and transform: scale(.4): Scales the text down on hover and moves its position to create an upward sliding effect",
"spans": [
{
"start": 0,
"end": 13,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 18,
"end": 38,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "35. Masking hover rays",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$47eca9b3-2c31-4775-9f11-4f56bc07c735",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/thebabydino/pen/YzppPmm",
"pen_title": "Hover rays with masking and Houdini magic (Chromium only)",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$1c5e6bb0-cf2f-4519-828d-b0f131dffbb7",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "The masking hover rays effect by Ana Tudor creates a dynamic effect on an image, where a series of gradients and masks are used to create other “images” that extend out of the original on hover. It resembles a squid’s tentacles extending outward and works with:",
"spans": [
{
"start": 4,
"end": 29,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/thebabydino/pen/YzppPmm",
"target": "_blank"
}
},
{
"start": 33,
"end": 42,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/thebabydino",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "mask: Applies multiple radial and linear gradients that control the areas where the image is visible and masked",
"spans": [
{
"start": 0,
"end": 4,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "filter: grayScale: Gives the image a gray scale effect that changes on hover",
"spans": [
{
"start": 0,
"end": 17,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading2",
"text": "Five other creative CSS hover effects I particularly liked",
"spans": [],
"direction": "ltr"
},
{
"type": "paragraph",
"text": "Lastly, let’s explore five more hover animations that don’t fit into any one category but I found to be really engaging.",
"spans": [],
"direction": "ltr"
},
{
"type": "heading3",
"text": "36. Scotch VHS",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$ab63f1e6-1a37-4938-8cdf-808ac813eb8a",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/BlurSoulx/pen/zYXJqMy",
"pen_title": "Scotch VHS CSS",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$ff83218f-bfec-4904-a232-13eaa2eb50a3",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "The Scotch VHS homepage effect by BlurSoulx spices up a product homepage with five types of animations:",
"spans": [
{
"start": 4,
"end": 23,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/BlurSoulx/pen/zYXJqMy",
"target": "_blank"
}
},
{
"start": 34,
"end": 43,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/BlurSoulx",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "Subtle entrance animation: Creates a fade-in effect when the page loads. It relies on @keyframes spawn to animate the page’s opacity from 0 to 1 and give the page a growing box-shadow",
"spans": [
{
"start": 86,
"end": 102,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 138,
"end": 139,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 143,
"end": 144,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "Sphere hover effect: A range of background gradient changes, box shadow effects, and scale up effects are applied to the buttons and links on hover",
"spans": [],
"direction": "ltr"
},
{
"type": "list-item",
"text": "Navigation link hover effects: The links and CTAs have various hover effects",
"spans": [],
"direction": "ltr"
},
{
"type": "list-item",
"text": "Animated GIF texture effect: Applies an animated GIF texture to the main container’s ::after pseudo-element on hover. It uses mix-blend-mode: screen to make the effect more colorful",
"spans": [
{
"start": 85,
"end": 92,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 126,
"end": 148,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "37. All but me",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$c1ff4b20-0021-4bc3-aec3-e94209560a45",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/seyedi/pen/RwdrMYw",
"pen_title": "All-but-me query with :has()",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$d5d448d9-92ce-44fc-9f41-f87c5ca8dae7",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "The all-but-me blog page effect by Mojtaba Seyedi introduces an interactive hover effect on a grid of cards, where hovering over a single card highlights it by making the other cards blur. It works with the following:",
"spans": [
{
"start": 4,
"end": 14,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/seyedi/pen/RwdrMYw",
"target": "_blank"
}
},
{
"start": 35,
"end": 49,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/seyedi",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": ":has() pseudo-class: Targets the parent .card-list to detect if any li child is being hovered (:has(li:hover)). It ensures the blur effect only applies when a hover event occurs",
"spans": [
{
"start": 0,
"end": 6,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 40,
"end": 50,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 68,
"end": 70,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 95,
"end": 109,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": ":not() pseudo-class: Used to exclude the hovered card (li:not(:hover)) from the blur effect",
"spans": [
{
"start": 0,
"end": 6,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 55,
"end": 69,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "filter: blur(): Applies a blur filter (blur(4px)) to the non-hovered cards to de-emphasize them. This makes the hovered card stand out from the crowd",
"spans": [
{
"start": 0,
"end": 14,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 39,
"end": 48,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "38. Cubes hover effect",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$3ecb0adb-2ed4-48eb-bfd9-401510712da7",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/gvissing/pen/QWBrzdB",
"pen_title": "CSS Only Cubes Hover Effects @ OnlineTutorialsYT",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$49b72737-2c96-454c-aa54-40ca9ddc1207",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "The cubes hover effect by Greg Vissing creates a dynamic 3D-like effect where stacked cubes rotate through various color hues on hover, giving the structure an eye-catching, colorful transition effect. It works with:",
"spans": [
{
"start": 4,
"end": 22,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/gvissing/pen/QWBrzdB",
"target": "_blank"
}
},
{
"start": 26,
"end": 38,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/gvissing",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "@keyframes animate: Applies a hue-rotate filter over the .container, creating a smooth color transition that loops infinitely over 5 seconds",
"spans": [
{
"start": 0,
"end": 18,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 30,
"end": 40,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 57,
"end": 67,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "translate(): Gives the structure its 3D-like positioning",
"spans": [
{
"start": 0,
"end": 11,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": ":before and :after: Create the side and top surfaces for the cubes",
"spans": [
{
"start": 0,
"end": 7,
"type": "label",
"data": {
"label": "inline-code"
}
},
{
"start": 12,
"end": 18,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "39. Inward shadow",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$74824ca5-75da-42e1-bd7c-3e4393fea7c7",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/smashingmag/pen/abPOwRm",
"pen_title": "Inward Shadow Pt. 2",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$880a6636-cd7b-4b27-9efc-17e1fec6651a",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "The inward shadow effect by Smashing Magazine creates an interactive and colorful overlay effect where three circular elements representing news publications transform on hover to reveal their logos. Its powered by:",
"spans": [
{
"start": 4,
"end": 17,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/smashingmag/pen/abPOwRm",
"target": "_blank"
}
},
{
"start": 28,
"end": 45,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/smashingmag",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "box-shadow: Gives the circles the initial subtle shadow",
"spans": [
{
"start": 0,
"end": 10,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": ".item:hover: Makes the text transparent and transitions the box shadow, revealing the logo within",
"spans": [
{
"start": 0,
"end": 11,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "heading3",
"text": "40. X-ray",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$e69a094b-8af0-4e7a-8626-89a45b349154",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "codepen",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"pen_url": "https://codepen.io/josetxu/pen/yLqWogR",
"pen_title": "X-Ray - Pure CSS",
"default_tab": "result",
"pen_height": 500,
"pen_editable": true,
"preview": false
},
"id": "code_snippet$fbf20840-e7f7-4b4c-8f08-8a423ade9b5d",
"slice_type": "code_snippet",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "paragraph",
"text": "Last but not least is the X-ray effect by Josetxu, which is simply mind-blowing. This animation shows an X-ray of the human body on hover. There are also two buttons for toggling between full body view and full X-ray view. The CSS powering this animation is long and quite complex, but some of the key things powering it are:",
"spans": [
{
"start": 26,
"end": 38,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/josetxu/pen/yLqWogR",
"target": "_blank"
}
},
{
"start": 42,
"end": 49,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://codepen.io/josetxu",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "@keyframes startup-scaner: Controls the initial movement of the scanner overlay during the startup sequence",
"spans": [
{
"start": 0,
"end": 25,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "@keyframes startup-skeleton: Gradually reveals the skeleton layer during the startup animation",
"spans": [
{
"start": 0,
"end": 27,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
},
{
"type": "list-item",
"text": "clip-path: Masks and reveals the skeleton in sync with the scanning zones, creating dynamic effects as users interact",
"spans": [
{
"start": 0,
"end": 9,
"type": "label",
"data": {
"label": "inline-code"
}
}
],
"direction": "ltr"
}
]
},
"id": "text_content$1df7d217-7ffc-4b65-92de-77fbf9c3122f",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "heading2",
"text": "Hover animation tools and libraries you should know",
"spans": [],
"direction": "ltr"
},
{
"type": "heading3",
"text": "Hover.css",
"spans": [],
"direction": "ltr"
},
{
"type": "paragraph",
"text": "Hover.css is a collection of CSS-powered hover effects that you can apply to images, links, SVGs, buttons, and more. It is a lightweight library that weighs 6.7kb (minified + gzipped).",
"spans": [
{
"start": 0,
"end": 9,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://ianlunn.github.io/Hover/",
"target": "_blank"
}
},
{
"start": 157,
"end": 183,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://bundlephobia.com/package/hover.css@2.3.2",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "paragraph",
"text": "Hover.css provides over 110 animation effects for animating CSS properties like background colors, borders, shadows, and icons.",
"spans": [],
"direction": "ltr"
},
{
"type": "image",
"url": "https://images.prismic.io/prismic-main/Z1kgJ5bqstJ98SS4_Hover.gif?auto=format,compress",
"alt": "A GIF of Hover.css",
"copyright": null,
"dimensions": {
"width": 800,
"height": 451
},
"id": "Z1kgJ5bqstJ98SS4",
"edit": {
"x": 0,
"y": 0,
"zoom": 1,
"background": "transparent"
}
},
{
"type": "heading3",
"text": "Mocassin.css",
"spans": [],
"direction": "ltr"
},
{
"type": "paragraph",
"text": "Mocassin.css provides a collection of 20+ hover effects for captions. It is designed to enhance user interactions with visually appealing animations and transitions. The library is easy to use and doesn’t require extensive customization or setup.",
"spans": [
{
"start": 0,
"end": 12,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://eliezerpujols.github.io/mocassin.css/",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "image",
"url": "https://images.prismic.io/prismic-main/Z1kgKZbqstJ98SS6_Mocassin.gif?auto=format,compress",
"alt": "A GIF of Macassin.css",
"copyright": null,
"dimensions": {
"width": 800,
"height": 451
},
"id": "Z1kgKZbqstJ98SS6",
"edit": {
"x": 0,
"y": 0,
"zoom": 1,
"background": "transparent"
}
},
{
"type": "heading3",
"text": "iHover",
"spans": [],
"direction": "ltr"
},
{
"type": "paragraph",
"text": "iHover is a collection of 20 hover effects that you can apply to your website. The library is built on SCSS and is compatible with CSS frameworks like Bootstrap.",
"spans": [
{
"start": 0,
"end": 6,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://gudh.github.io/ihover/dist/index.html",
"target": "_blank"
}
},
{
"start": 131,
"end": 145,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://prismic.io/blog/best-css-frameworks",
"target": "_blank"
}
},
{
"start": 151,
"end": 160,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://prismic.io/blog/tailwind-vs-bootstrap",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "image",
"url": "https://images.prismic.io/prismic-main/Z1kgKJbqstJ98SS5_iHover.gif?auto=format,compress",
"alt": "A GIF of iHover",
"copyright": null,
"dimensions": {
"width": 800,
"height": 451
},
"id": "Z1kgKJbqstJ98SS5",
"edit": {
"x": 0,
"y": 0,
"zoom": 1,
"background": "transparent"
}
},
{
"type": "paragraph",
"text": "",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$ca19083b-861e-4560-afa1-cda5bc33af6c",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [],
"primary": {
"content": [
{
"type": "heading3",
"text": "Conclusion",
"spans": [],
"direction": "ltr"
},
{
"type": "paragraph",
"text": "Adding hover animations to your website is a great way to give visitors a more engaging and interactive user experience. Whether you're enhancing buttons, images, text, or other elements, these animations can add personality and depth to your designs, leaving a stronger impression.",
"spans": [
{
"start": 104,
"end": 119,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https://prismic.io/blog/ux-tips-for-developers",
"target": "_blank"
}
}
],
"direction": "ltr"
},
{
"type": "paragraph",
"text": "We trust you’ve gained inspiration from the CSS hover animations we’ve explored in this article. Keep coding and remember to share what you build with the Prismic team!",
"spans": [],
"direction": "ltr"
}
]
},
"id": "text_content$940ba2c0-c8cd-42ac-a751-979728b12148",
"slice_type": "text_content",
"slice_label": null
},
{
"variation": "default",
"version": "sktwi1xtmkfgx8626",
"items": [
{
"related": {
"id": "Z092UhMAAESD9Msn",
"type": "blog",
"tags": [
"CSS"
],
"lang": "en-eu",
"slug": "css-text-animations-40-creative-examples-to-try",
"first_publication_date": "2024-12-06T14:50:17+0000",
"last_publication_date": "2026-06-04T15:00:07+0000",
"uid": "css-text-animations",
"link_type": "Document",
"key": "638acfe0-e8e9-46a8-ae1d-ce5482d74221",
"isBroken": false
}
},
{
"related": {
"id": "ZYRzgREAAPFHiyoi",
"type": "blog",
"tags": [],
"lang": "en-eu",
"slug": "top-9-css-frameworks-for-developers-and-designers-in-2026",
"first_publication_date": "2023-12-27T13:21:22+0000",
"last_publication_date": "2026-01-11T19:35:44+0000",
"uid": "best-css-frameworks",
"link_type": "Document",
"key": "5a33020f-5bb3-4587-8704-2eb9caf91c26",
"isBroken": false
}
}
],
"primary": {
"title": [
{
"type": "heading2",
"text": "You might also like...",
"spans": [],
"direction": "ltr"
}
]
},
"id": "related_posts$a24472a0-9897-4eaf-acf1-6279dd503964",
"slice_type": "related_posts",
"slice_label": null
}
],
"meta_title": "40 CSS Hover Effects: Engaging Animations and Code",
"meta_description": "Discover 40+ CSS hover effects, from holographic cards to liquid buttons, each with a live CodePen demo and ready-to-use code. Try one on your site today.",
"social_image": {},
"short_name": "CSS Hover Effects",
"part_of_guide": {
"id": "Z27TLhEAACQAWyMd",
"type": "blog_guide",
"tags": [
"CSS"
],
"lang": "en-eu",
"slug": "css-animation-collection-150-examples--code",
"first_publication_date": "2024-12-27T16:30:51+0000",
"last_publication_date": "2025-05-06T02:21:49+0000",
"uid": "css-animations",
"link_type": "Document",
"key": "1092f0c2-a0e2-410c-8836-71c37f1f2332",
"isBroken": false
}
}