-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparallax-hero.css
More file actions
39 lines (35 loc) · 783 Bytes
/
Copy pathparallax-hero.css
File metadata and controls
39 lines (35 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
* Demo 2 — parallax hero.
*
* A continuous `cover` range, so the plugin picks the progress fallback: the
* runtime seeks a paused WAAPI animation built from these keyframes and mirrors
* the value into `--saf-progress`.
*/
@keyframes hero-parallax {
from {
transform: translateY(-14%) scale(1.2);
}
to {
transform: translateY(14%) scale(1.2);
}
}
@keyframes hero-caption {
from {
opacity: 1;
letter-spacing: 0.02em;
}
to {
opacity: 0.15;
letter-spacing: 0.4em;
}
}
.hero__layer {
animation: hero-parallax 1s linear both;
animation-timeline: view();
animation-range: cover 0% cover 100%;
}
.hero__caption {
animation: hero-caption 1s linear both;
animation-timeline: view();
animation-range: contain 0% cover 100%;
}