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

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
B
Blog RSS Feed
W
WeLiveSecurity
I
InfoQ
L
Lohrmann on Cybersecurity
Simon Willison's Weblog
Simon Willison's Weblog
腾讯CDC
S
Schneier on Security
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Threat Research - Cisco Blogs
P
Palo Alto Networks Blog
Attack and Defense Labs
Attack and Defense Labs
I
Intezer
Recent Commits to openclaw:main
Recent Commits to openclaw:main
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Last Week in AI
Last Week in AI
WordPress大学
WordPress大学
Cisco Talos Blog
Cisco Talos Blog
T
The Exploit Database - CXSecurity.com
S
Securelist
T
Tailwind CSS Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
美团技术团队
Stack Overflow Blog
Stack Overflow Blog
T
Tor Project blog
博客园 - 叶小钗
Engineering at Meta
Engineering at Meta
Microsoft Security Blog
Microsoft Security Blog
Project Zero
Project Zero
C
Cybersecurity and Infrastructure Security Agency CISA
Apple Machine Learning Research
Apple Machine Learning Research
V
Visual Studio Blog
Know Your Adversary
Know Your Adversary
T
The Blog of Author Tim Ferriss
N
News and Events Feed by Topic
小众软件
小众软件
G
Google Developers Blog
F
Full Disclosure
O
OpenAI News
The Last Watchdog
The Last Watchdog
G
GRAHAM CLULEY
TaoSecurity Blog
TaoSecurity Blog
U
Unit 42
Jina AI
Jina AI
S
SegmentFault 最新的问题
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
P
Proofpoint News Feed
Y
Y Combinator Blog
N
News and Events Feed by Topic
K
Kaspersky official blog

Stuff & Nonsense Blog feed

The camera that took me places - Stuff & Nonsense Last week in the studio (CW27-26) - Stuff & Nonsense Last week in the studio (CW26-26) - Stuff & Nonsense Tracking down a nasty Netlify bandwidth burner - Stuff & Nonsense Last week in the studio (CW25-26) - Stuff & Nonsense Eleventy in a Box. A premium Eleventy start kit - Stuff & Nonsense Migrating from Statamic to Eleventy. This site’s had major surgery - Stuff & Nonsense Last week in the studio (CW24-26) - Stuff & Nonsense Last week in the studio (CW21-26) - Stuff & Nonsense Last week in the studio (CW20-26) - Stuff & Nonsense Last week in the studio (CW19-26) - Stuff & Nonsense Websites shouldn’t need maintenance. They need momentum. - Stuff & Nonsense Making my view options toolbar more intuitive - Stuff & Nonsense Unfinished Business #142: The perfect request for proposal - Stuff & Nonsense Last week in the studio (CW18-26) - Stuff & Nonsense Militant masthead logo (r)evolution - Stuff & Nonsense Eleventy in a Box just add water - Stuff & Nonsense Last week in the studio (CW17-26) - Stuff & Nonsense Last week in the studio (CW16-26) - Stuff & Nonsense Far Right So Wrong; Stop Reform t-shirts are back in my shop - Stuff & Nonsense Last week in the studio (CW15-26) - Stuff & Nonsense I got tired of correcting machines, so I gave them five rules - Stuff & Nonsense How I designed an information-rich website for The Shared Homeland Paradigm - Stuff & Nonsense A bold new website for the Academy of Scoring Arts - Stuff & Nonsense
I added a spring mode to my animated SVG landscape - Stuff & Nonsense
Andy Clarke, Stuff & Nonsense Ltd. · 2026-04-19 · via Stuff & Nonsense Blog feed

I’ve added a “spring mode” to my animated SVG desert. Flowers bloom, colours shift, and the whole scene feels more alive—all without creating a separate version. Instead, I’m layering changes on top of the same SVG and letting CSS and JavaScript do the work.

Flowers are blooming on my website, courtesy of a new ‘Spring mode,’ which adds new colours and animations. Spring’s definitely sprung, and it’s a wonderful time to be in the desert.

My spring home page graphic animation

Visit my home page to see this in action. Flowers bloom on the cacti and between the craggy rocks, turning a dry landscape into something more alive.

Instead of creating a separate version of the animated SVG scene, I treated spring as a new layer of behavioural and visual changes and applied it to the same SVG. That meant I could reuse the structure and progressively enhance it with animation, colour, and details.

How I layered seasonal changes in SVG

Adding spring to my animated SVG landscape meant introducing a few new layers:

  • A static layer to recolour the background
  • Blue, purple, red, white, and yellow flowers

The static layer sits above the base illustration. It lightens the clouds, shifts the sky to blue, and warms the rocks into sandier tones. I treat this as a seasonal mode or reusable layer that changes how the same SVG looks and behaves without duplicating it.

Summer background colours
Spring background colours

I’m layering changes on top, keeping everything flexible and making maintenance easier. This isn’t just about SVG; JavaScript controls the state, and CSS defines how it looks.

Spring mode flowers

How the mode works

JavaScript determines which mode the animated SVG scene is in. It handles switching, prepares the flowers, and remembers a visitor’s choice when they return. CSS handles how that mode looks—changing colours, revealing elements, and animating them into view. This all hinges on adding a spring-mode class to my SVG.

How flowers are animated

Flowers are hidden by default and become visible when spring mode is active. JavaScript assigns each flower a slightly different delay, so they appear in a scattered sequence across the landscape without an obvious pattern. Each flower starts hidden and scaled down:

opacity: 0;
scale: 0;
visibility: hidden;

When spring mode is active and motion is allowed, the flowers play a short “pop” animation:

@media (prefers-reduced-motion:no-preference) {
#svg-large[data-animations=on].spring-mode .spring-flower {
animation-delay:var(--flower-delay,0s);
animation-duration:1.1s;
animation-fill-mode:both;
animation-name:spring-flower-pop;
animation-timing-function:cubic-bezier(.2,1.45,.35,1); }
}

The animation slightly overshoots before settling, giving a gentle, organic feel:

@keyframes spring-flower-pop {
0% {opacity:0;scale:0;visibility:hidden; }
70% {opacity:1;scale:1.06;visibility:visible; }
100% {opacity:1;scale:1;visibility:visible}; }
}

Respecting reduced motion

Animations only run when visitors haven’t asked for reduced motion. If they have, flowers appear without animation. It’s a small detail, but it keeps the experience inclusive without compromising the design.

The result

Spring mode off
Spring mode on

Use the flower button to toggle spring mode and see how these layers transform the scene.

Why this approach works

Treating spring as a mode rather than a separate design keeps everything lightweight and flexible. I can evolve the same SVG over time by adding seasonal or thematic variations without rebuilding it from scratch.

Plus, I love that these animated SVGs keep giving me new ways to play with my website.


April 18, 2026 • Andy Clarke • animationcsssvg

You might also like