Skip to content

176 web animation techniques, each a live demo with plain settings and a ready-made prompt for your AI assistant. No dependencies, no build step.

fix: clamp cover-title font-size, remove invalid will-change, add scene id

matin21541be5e13f
diff --git a/animations/01-scroll-based/cover-card-to-fixed-header/index.html b/animations/01-scroll-based/cover-card-to-fixed-header/index.html
index 895d3c6b..4abe6420 100644
--- a/animations/01-scroll-based/cover-card-to-fixed-header/index.html
+++ b/animations/01-scroll-based/cover-card-to-fixed-header/index.html
@@ -25,7 +25,7 @@
border:1px solid var(--ui-border);border-radius:8px;
}
.stage::-webkit-scrollbar{display:none}
- .scene{min-height:2500px}
+ .scene{min-height:2500px;position:relative}
.cover{
position:sticky;top:0;z-index:10;
@@ -53,9 +53,8 @@
letter-spacing:1px;text-transform:uppercase;margin-bottom:8px;
}
.cover-title{
- font-size:26px;color:#d1f7d6;line-height:1.2;
+ font-size:clamp(18px,4vw,26px);color:#d1f7d6;line-height:1.2;
letter-spacing:-.5px;margin-bottom:8px;
- will-change:font-size;
}
.cover-sub{
font-size:12px;color:#3d7a52;line-height:1.5;margin-bottom:14px;
@@ -138,7 +137,7 @@
<div class="layout">
<div class="stage" id="stage">
- <div class="scene">
+ <div class="scene" id="scene">
<div class="cover" id="cover">
<div class="cover-bg" id="cover-bg"></div>