惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
Cybersecurity and Infrastructure Security Agency CISA
WordPress大学
WordPress大学
人人都是产品经理
人人都是产品经理
小众软件
小众软件
博客园 - 【当耐特】
爱范儿
爱范儿
美团技术团队
Jina AI
Jina AI
Hugging Face - Blog
Hugging Face - Blog
博客园 - 聂微东
月光博客
月光博客
宝玉的分享
宝玉的分享
V
V2EX
Blog — PlanetScale
Blog — PlanetScale
Spread Privacy
Spread Privacy
博客园 - 叶小钗
量子位
Security Archives - TechRepublic
Security Archives - TechRepublic
Google DeepMind News
Google DeepMind News
L
LINUX DO - 热门话题
Hacker News - Newest:
Hacker News - Newest: "LLM"
P
Privacy International News Feed
Y
Y Combinator Blog
P
Proofpoint News Feed
NISL@THU
NISL@THU
The Last Watchdog
The Last Watchdog
S
Secure Thoughts
G
Google Developers Blog
Hacker News: Ask HN
Hacker News: Ask HN
Help Net Security
Help Net Security
I
InfoQ
Cisco Talos Blog
Cisco Talos Blog
Google Online Security Blog
Google Online Security Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Recent Announcements
Recent Announcements
Simon Willison's Weblog
Simon Willison's Weblog
Vercel News
Vercel News
Recent Commits to openclaw:main
Recent Commits to openclaw:main
T
Threat Research - Cisco Blogs
GbyAI
GbyAI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
C
CXSECURITY Database RSS Feed - CXSecurity.com
V
Vulnerabilities – Threatpost
B
Blog
Stack Overflow Blog
Stack Overflow Blog
Microsoft Azure Blog
Microsoft Azure Blog
N
News | PayPal Newsroom
J
Java Code Geeks
Latest news
Latest news
H
Hackread – Cybersecurity News, Data Breaches, AI and More

HN's home page

More than 6 out of 10 people turn to AI for psychological support AI Outperforms Law Professors in Stanford Law Study databow: a Rust CLI to query any database with an ADBC driver Pluto.jl 1.0 release – reactive notebook for Julia Use your Nvidia GPU's VRAM as swap space on Linux Show HN: Paseo – Beautiful open-source coding agent interface 4K years ago, Mohenjo-daro grew more equal over time Gleam v1.17.0 Released I'm skeptical about efforts to revolutionize schooling CT scans of BYD car parts Branchless Quicksort faster than std:sort and pdqsort with C and C++ API My thoughts after using Clojure for about a month The advertising cartel coming to your web browser Open Repair Data Standard – Open Repair Alliance JLink JTAG Access on the Pinecil Gmail Thinks I'm Stupid, So I Left HP re-releases classic computer science calculator: The HP-16C Show HN: Edsger – A handwritten Clojure REPL for the reMarkable 2 Microsoft's MAI-Code-1-Flash Scores 51% SWE-Bench Pro with Just 5B Active Params MAI-Thinking-1 Microsoft Announces AI Autopilot | Hacker News Morningstar values SpaceX at $780B, half its IPO target GitHub Copilot App | Hacker News Bringing Up DeepSeek-V4-Flash on AMD MI300X U.S. Army Corps of Engineers Bay Model Anthropic scales Claude Mythos to critical infrastructure in 15 countries QBE – Compiler Backend – 1.3 Larry Ellison: "Citizens will be on their best behavior because we’re recording" (2024) Three Ways to Get Paid (2018) Coreutils for Windows | Hacker News Trump signs executive order granting oversight of AI models Rethinking Search as Code Generation How we index images for RAG 1-Click GitHub Token Stealing via a VSCode Bug thunderbolt-ibverbs: We have InfiniBand at home WiFi Time | Hacker News Preparing for KDE Plasma's Last X11-Supported Release Please don't spam people looking for employment. It's just cruel Fidonet: Technology, Use, Tools, and History (1993) A walking tour of surveillance infrastructure in Seattle Expanding Project Glasswing Apple rejected my dictation app for using the accessibility API Adafruit receives demand letter from Fenwick legal counsel on behalf of Flux.ai Stop Ruining It Why Janet? (2023) | Hacker News You Don't Love Systemd Timers Enough Show HN: Eyeball | Hacker News Strace-ui, Bonsai_term, and the TUI renaissance macOS needs its grid back How is Groq raising more money? Can the stockmarket swallow Anthropic, SpaceX and OpenAI? Age verification for social media, the beginning of the end for a free internet? Chipotlai Max | Hacker News OpenAI frontier models and Codex are now available on AWS Debug Project | Hacker News Should you normalize RGB values by 255 or 256? AI Agent Guidelines for CS336 at Stanford The newest Instagram “exploit” is the goofiest I've seen Anthropic confidentially submits draft S-1 to the SEC The Dirt That Refused to Die KDE at 30 The Pirate Bay Remains Resilient, 20 Years After the Raid CS336: Language Modeling from Scratch Sysadmining Like It's 2009 | Hacker News Nvidia Cosmos 3 Malicious npm packages detected across Red Hat Cloud Services Windows GOG DOS Games on M-Series Macs Flipper Zero Zig Template | Hacker News Linux Basics for Hackers (2019) Launch HN: Expanse (YC P26) – Unlock Wasted GPU Capacity Microsoft builds MacBook Pro rival with NVIDIA-powered Surface Laptop Ultra Now is the best time to be a duct tape engineer Go Experiments Explained | Hacker News Using Git's rerere feature to escape recurring conflict hell How turkey hacked the hair-transplant industry A 10 year old Xeon is all you need Sum-product, unit distances, and number fields Chuwi Minibook X | Hacker News Cloudflare Turnstile requiring fingerprintable WebGL Dav2d | Hacker News Squillions: How money laundering won London's Free Roof Terraces | Hacker News The Website Specification | Hacker News Why Custom Attributes in .NET Give Me Nightmares Muxcard, a dyi credit card size computer Webcam head tracking, webcam to control in‑game FOV CQL: Categorical Databases | Hacker News Decades of Effort Restore Steelhead and Salmon Passage on Alameda Creek Reviving Teletext for Ham Radio Unix in East Germany (GDR) (1990) Benchmarking SurrealDB 3.x vs. Postgres, Mongo, Neo4j and Redis (With Fsync) Key chemistry question answered, no quantum computer required New Beam Spring Keyboards | Hacker News Finding success in industry as a chip designer Linux/M68k | Hacker News Fooling around with encrypted reasoning blobs The Genius of the Barn Owl's Feathers Having your insulin pump die while you're on vacation Tracing HTTP Requests with Go's net/HTTP/httptrace Only 17% of all 64-bit Integers are products of two 32-bit integers
CSS-Native Parallax Effect | Hacker News
dandep · 2026-06-02 · via HN's home page

That sounds interesting but it would be a whole lot more interesting if the page was itself an example of said effect!


I really like the fact that your "recipe" already includes support for prefers-reduced-motion. Parallax can really trigger motion sensitivity issues up to vomiting or several days of bed rest with severe migraine.

You did leave that part out of your recipe though. Would you mind adding it there, so that people who copy paste are more inclined to actually keep/use that part as well?


its beautiful! where can I track the compatibility?

and how do I know if I'm hitting the fallback?


updated it with info on what you're using and current baselines comp (Chrome/Edge 115+, Safari 26+, and Firefox behind a flag).


How does this compare to the classic css-native parallax effect? Before the scroll timeline APIs you'd use the "perspective" css property to create a container where the z plane is n pixels away from the screen, and then position each layer within it at a different z distance using transform: translateZ

That method is GPU accelerated too, so it is performant compared to some js solutions, and has worked well in every browser for around a decade

I like the idea of the scroll-timeline though, just keen to understand what the advantage is for this


OP here, thanks for asking. While the `perspective` technique works too, it has the downside of needing a careful combination of scroller elements and properties.

This approach adds a single class to the image container and that's it. Plus you can control many aspects of the animation such as entry/exit ranges, and make it control other properties like opacity or color, for example.

I know browser support is still lacking, but it will get there eventually. I'm not using this in production code yet, but I think it's useful to experiment with these new CSS APIs.


When using Z, if the element is close to the bottom of the page, or a very large Z, I found it to increase the length of the scroll bar unexpectedly. Or unexpectedly to me looking for parallax, it would make sense as a normal zoom or scale.


This method should still support GPU acceleration, as `transform` (or rotate/scale/etc.) is the only property being animated. The benefit of animation-timeline seems to be that it's much easier to set up than a CSS perspective context.


No doubt quite a few folk with the same question. Keen to understand performance tradeoffs.

Obvious comparison note would be that the "new" method currently enjoys somewhat limited browser support (no Firefox without a flag, and only since Safari 26)


I was wondering the same thing. That translateZ is a bit fiddly to get right, so I could believe this is a bit easier to use, maybe? And presumably this could be used for other properties besides position, like colors, opacity or blurs.


For people saying it's not working in any browser - do you have some kind of reduced motion preference setting turned on? I can imagine that would have an effect on something like this and it's definitely working in Chrome for me.


Yes... there's a media query in the codepen disabling animation for people with reduced motion enabled.


Enabling (layout.css.scroll-driven-animations.enabled) and refreshing the codepen gives a "we crashed this to prevent a crash from an infinite loop" clicking to allow the infinite loops allowed me to see the animation.

Fedora 44 Kernel: x86_64 Linux 7.0.10-201.fc44.x86_64 Firefox 151.0.2


The JS and bot check are for making additional functionality, beyond just showing the example, work easily. I.e. editing and sharing edits from a browser. If all you want is a static example, feel free to make it without these things.


firefox android does not support CSS animation-timeline, and firefox desktop needs layout.css.scroll-driven-animations.enabled. This probably should not be used for any critical features.


oh that's cool!

Can only see it on chrome though =/. I switched to Safari as the lesser of two data-harvesting evils. Or rather, with an iPhone I've already chosen my overlord. I also switched to Kagi. Trying to deGoogle myself.


I played around with this API some time ago. It’s simple and high-performance, but one feature I wish existed is damping. Scroll-driven animations are tied directly to the scroll timeline, so there’s no concept of the parallax object “catching up” to the scroll progress over, say, one second. From what I remember, `animation-timing-function` feels weird when you scroll, so it’s not the right solution. GSAP offers this, but it’s JS-only.


In a world where it's increasingly overlooked, I'm glad the author mentions disabling it respecting user settings. I do think it should be reversed and only enabled with the `@media (prefers-reduced-motion: no-preference)`, but that is the opinion of someone who gets negative value from animations and is bemused by how much dev and compute time is spent on them.


Great. I tried the Google examples a while ago and got nowhere with it, time for another go, within the netherworld of SVG, to map to several different layers.


Love the one-variable design where scale and translate stay in sync automatically, just wish Firefox would get off the flag already.


I was expecting a demo on the linked page itself. Interesting to let Codex or Claude Code do it :)


Using css perspective for parallax has been around for years and is much simpler code.


Slightly disorienting but mostly just gimmicky. Luckily the "scroll down and more stuff than just scroll i going on" trend has mostly faded.


Yes. I'm a little more sensitive than average, but not enough to turn off animations, and this is uncomfortable.


could this be combined with a sprite like image that shows a slightly different angle of the image with each step