<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/hover-proximity-with-scroll-driven-animations-uxxsa159d" -->

---
title: Hover Proximity with Scroll-Driven Animations | daily.dev
description: A hover proximity effect—where hovering one grid element also visually affects nearby ones—is achieved using modern CSS features including CSS Grid coordinate...
canonical: https://daily.dev/posts/hover-proximity-with-scroll-driven-animations-uxxsa159d
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Hover Proximity with Scroll-Driven Animations | daily.dev
og:description: A hover proximity effect—where hovering one grid element also visually affects nearby ones—is achieved using modern CSS features including CSS Grid coordinate...
og:url: https://daily.dev/posts/hover-proximity-with-scroll-driven-animations-uxxsa159d
og:image: https://api.daily.dev/og/posts/UXXSa159d.png
og:image:alt: Hover Proximity with Scroll-Driven Animations
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Hover Proximity with Scroll-Driven Animations

**[CSS Tip](https://daily.dev/sources/csstip)** · 2 min read · 10 upvotes · 0 comments

## Summary

A hover proximity effect—where hovering one grid element also visually affects nearby ones—is achieved using modern CSS features including CSS Grid coordinate calculations, scroll-driven animations (view-timeline), and conditional CSS with functions like round(), mod(), hypot(), and if()/style(). The technique currently only works in Chromium-based browsers. Full code snippets are provided for the grid setup, coordinate tracking via scroll-driven animation timelines, and the conditional translate/scale logic that creates the proximity effect. A deeper explanatory article is promised for later.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://css-tip.com/hover-proximity>

## Questions this post answers

### How can I create a hover proximity effect in CSS where nearby grid items react to a hovered element?

Combine CSS grid coordinate calculation using sibling-index() and sibling-count() with scroll-driven view-timeline animations bound to a hovered element, then use the hypot() function to compute distance between each item's coordinates and the hovered item's coordinates. Apply conditional translate and scale values with if()/style() queries based on that distance, so nearby elements shrink or nudge proportionally. This currently works only in Chromium-based browsers.

_daily.dev surfaces cutting-edge CSS techniques like this for developers pushing browser feature boundaries._

## Similar posts on daily.dev

- [Hover Proximity Using Modern CSS – Master.dev Blog](https://daily.dev/posts/hover-proximity-using-modern-css-master-dev-blog-wa5xjv85b) · Frontend Masters · 18 upvotes · 1 comments
- [Responsive CSS Grid Layout with Animation](https://daily.dev/posts/responsive-css-grid-layout-with-animation-gbusjvg4t) · CSS Tip · 34 upvotes · 0 comments
- [Recreating Apple’s Vision Pro Animation in CSS](https://daily.dev/posts/recreating-apple-s-vision-pro-animation-in-css-de7qk8yoq) · CSS-Tricks · 10 upvotes · 0 comments

---

Tags: [#css](https://daily.dev/tags/css), [#chromium](https://daily.dev/tags/chromium)

[View this post on daily.dev](https://daily.dev/posts/hover-proximity-with-scroll-driven-animations-uxxsa159d)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Hover Proximity with Scroll-Driven Animations","url":"https://daily.dev/posts/hover-proximity-with-scroll-driven-animations-uxxsa159d","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/hover-proximity-with-scroll-driven-animations-uxxsa159d"},"datePublished":"2026-08-19T10:37:57.231Z","dateModified":"2026-09-14T09:09:34.732Z","description":"A hover proximity effect—where hovering one grid element also visually affects nearby ones—is achieved using modern CSS features including CSS Grid coordinate...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/c0a0df7f048ac3c1dfceb7e8e2e5ede8?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/c0a0df7f048ac3c1dfceb7e8e2e5ede8?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"CSS Tip","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"CSS Tip","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/5d335233e7894c2ea997aa89e1724200","url":"https://daily.dev/sources/csstip"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/hover-proximity-with-scroll-driven-animations-uxxsa159d","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":10},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"css,chromium","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"CSS Tip","item":"https://daily.dev/sources/csstip"},{"@type":"ListItem","position":3,"name":"Hover Proximity with Scroll-Driven Animations"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/hover-proximity-with-scroll-driven-animations-uxxsa159d#faq","mainEntity":[{"@type":"Question","name":"How can I create a hover proximity effect in CSS where nearby grid items react to a hovered element?","acceptedAnswer":{"@type":"Answer","text":"Combine CSS grid coordinate calculation using sibling-index() and sibling-count() with scroll-driven view-timeline animations bound to a hovered element, then use the hypot() function to compute distance between each item's coordinates and the hovered item's coordinates. Apply conditional translate and scale values with if()/style() queries based on that distance, so nearby elements shrink or nudge proportionally. This currently works only in Chromium-based browsers. daily.dev surfaces cutting-edge CSS techniques like this for developers pushing browser feature boundaries."}}]}
```

