Blame view

docs/ppt-assets/animations.css 7.88 KB
70a63b78   王彪总   feat(garden): 添加团...
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
  /* html-ppt :: animations.css
   * Apply by adding class="anim-<name>" or data-anim="<name>".
   * Durations are deliberately snappy; tweak --anim-dur per element.
   */
  :root{--anim-dur:.7s;--anim-ease:cubic-bezier(.4,0,.2,1)}
  
  /* ---------- FADE DIRECTIONALS ---------- */
  @keyframes kf-fade-up{from{opacity:0;transform:translateY(32px)}to{opacity:1;transform:none}}
  @keyframes kf-fade-down{from{opacity:0;transform:translateY(-32px)}to{opacity:1;transform:none}}
  @keyframes kf-fade-left{from{opacity:0;transform:translateX(-40px)}to{opacity:1;transform:none}}
  @keyframes kf-fade-right{from{opacity:0;transform:translateX(40px)}to{opacity:1;transform:none}}
  .anim-fade-up{animation:kf-fade-up var(--anim-dur) var(--anim-ease) both}
  .anim-fade-down{animation:kf-fade-down var(--anim-dur) var(--anim-ease) both}
  .anim-fade-left{animation:kf-fade-left var(--anim-dur) var(--anim-ease) both}
  .anim-fade-right{animation:kf-fade-right var(--anim-dur) var(--anim-ease) both}
  
  /* ---------- RISE / DROP / ZOOM / BLUR / GLITCH ---------- */
  @keyframes kf-rise{from{opacity:0;transform:translateY(60px) scale(.97);filter:blur(6px)}to{opacity:1;transform:none;filter:none}}
  @keyframes kf-drop{from{opacity:0;transform:translateY(-60px) scale(.97)}to{opacity:1;transform:none}}
  @keyframes kf-zoom{0%{opacity:0;transform:scale(.6)}60%{transform:scale(1.04)}100%{opacity:1;transform:scale(1)}}
  @keyframes kf-blur{from{opacity:0;filter:blur(18px)}to{opacity:1;filter:none}}
  @keyframes kf-glitch{0%{opacity:0;transform:translateX(0);clip-path:inset(0 0 0 0)}
    20%{opacity:1;transform:translateX(-6px);clip-path:inset(20% 0 30% 0)}
    40%{transform:translateX(4px);clip-path:inset(50% 0 10% 0)}
    60%{transform:translateX(-3px);clip-path:inset(10% 0 60% 0)}
    80%{transform:translateX(2px);clip-path:inset(0 0 0 0)}
    100%{opacity:1;transform:none}}
  .anim-rise-in{animation:kf-rise .9s var(--anim-ease) both}
  .anim-drop-in{animation:kf-drop .8s var(--anim-ease) both}
  .anim-zoom-pop{animation:kf-zoom .7s cubic-bezier(.22,1.3,.36,1) both}
  .anim-blur-in{animation:kf-blur .8s var(--anim-ease) both}
  .anim-glitch-in{animation:kf-glitch .8s steps(5,end) both}
  
  /* ---------- TYPEWRITER ---------- */
  .anim-typewriter{display:inline-block;overflow:hidden;white-space:nowrap;border-right:2px solid currentColor;
    width:0;animation:kf-type 2.4s steps(40,end) forwards, kf-caret 1s step-end infinite}
  @keyframes kf-type{to{width:100%}}
  @keyframes kf-caret{50%{border-color:transparent}}
  
  /* ---------- GLOW / SHIMMER / GRADIENT-FLOW ---------- */
  @keyframes kf-neon{0%,100%{text-shadow:0 0 8px var(--accent),0 0 20px var(--accent)}
    50%{text-shadow:0 0 16px var(--accent),0 0 40px var(--accent),0 0 80px var(--accent)}}
  .anim-neon-glow{animation:kf-neon 2s ease-in-out infinite}
  
  .anim-shimmer-sweep{position:relative;overflow:hidden}
  .anim-shimmer-sweep::after{content:"";position:absolute;inset:0;
    background:linear-gradient(110deg,transparent 40%,rgba(255,255,255,.55) 50%,transparent 60%);
    transform:translateX(-100%);animation:kf-shimmer 2.4s var(--anim-ease) infinite}
  @keyframes kf-shimmer{to{transform:translateX(100%)}}
  
  .anim-gradient-flow{background:linear-gradient(90deg,var(--accent),var(--accent-2,var(--accent)),var(--accent-3,var(--accent)),var(--accent));
    background-size:300% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;
    animation:kf-gradflow 4s linear infinite}
  @keyframes kf-gradflow{to{background-position:300% 0}}
  
  /* ---------- STAGGER LIST ---------- */
  .anim-stagger-list > *{opacity:0;animation:kf-rise .65s var(--anim-ease) both}
  .anim-stagger-list > *:nth-child(1){animation-delay:.05s}
  .anim-stagger-list > *:nth-child(2){animation-delay:.15s}
  .anim-stagger-list > *:nth-child(3){animation-delay:.25s}
  .anim-stagger-list > *:nth-child(4){animation-delay:.35s}
  .anim-stagger-list > *:nth-child(5){animation-delay:.45s}
  .anim-stagger-list > *:nth-child(6){animation-delay:.55s}
  .anim-stagger-list > *:nth-child(7){animation-delay:.65s}
  .anim-stagger-list > *:nth-child(8){animation-delay:.75s}
  .anim-stagger-list > *:nth-child(n+9){animation-delay:.85s}
  
  /* ---------- COUNTER-UP (JS-driven, marker class only) ---------- */
  .counter{font-variant-numeric:tabular-nums}
  
  /* ---------- SVG PATH DRAW ---------- */
  .anim-path-draw path,.anim-path-draw line,.anim-path-draw polyline,.anim-path-draw circle,.anim-path-draw rect{
    stroke-dasharray:1000;stroke-dashoffset:1000;animation:kf-draw 2s var(--anim-ease) forwards}
  @keyframes kf-draw{to{stroke-dashoffset:0}}
  
  /* ---------- PARALLAX TILT (hover) ---------- */
  .anim-parallax-tilt{transform-style:preserve-3d;transition:transform .4s var(--anim-ease)}
  .anim-parallax-tilt:hover{transform:perspective(900px) rotateX(6deg) rotateY(-8deg) translateZ(10px)}
  
  /* ---------- CARD FLIP 3D ---------- */
  @keyframes kf-flip{from{transform:perspective(1200px) rotateY(-90deg);opacity:0}
    to{transform:perspective(1200px) rotateY(0);opacity:1}}
  .anim-card-flip-3d{animation:kf-flip .9s var(--anim-ease) both;transform-style:preserve-3d;backface-visibility:hidden}
  
  /* ---------- CUBE ROTATE 3D ---------- */
  @keyframes kf-cube{from{transform:perspective(1200px) rotateX(20deg) rotateY(-90deg) translateZ(-200px);opacity:0}
    to{transform:perspective(1200px) rotateX(0) rotateY(0) translateZ(0);opacity:1}}
  .anim-cube-rotate-3d{animation:kf-cube 1s var(--anim-ease) both}
  
  /* ---------- PAGE TURN 3D ---------- */
  @keyframes kf-pageturn{from{transform:perspective(1600px) rotateY(-85deg);transform-origin:left center;opacity:0}
    to{transform:perspective(1600px) rotateY(0);opacity:1}}
  .anim-page-turn-3d{animation:kf-pageturn 1s var(--anim-ease) both;transform-origin:left center}
  
  /* ---------- PERSPECTIVE ZOOM ---------- */
  @keyframes kf-pzoom{from{opacity:0;transform:perspective(1400px) translateZ(-400px) rotateX(12deg)}
    to{opacity:1;transform:none}}
  .anim-perspective-zoom{animation:kf-pzoom 1s var(--anim-ease) both}
  
  /* ---------- MARQUEE SCROLL ---------- */
  .anim-marquee-scroll{display:flex;gap:48px;white-space:nowrap;animation:kf-marquee 20s linear infinite}
  @keyframes kf-marquee{from{transform:translateX(0)}to{transform:translateX(-50%)}}
  
  /* ---------- KEN BURNS ---------- */
  @keyframes kf-kenburns{0%{transform:scale(1) translate(0,0)}100%{transform:scale(1.15) translate(-2%,-1%)}}
  .anim-kenburns{animation:kf-kenburns 14s ease-in-out infinite alternate}
  
  /* ---------- CONFETTI BURST (pseudo — pure CSS sparkles) ---------- */
  .anim-confetti-burst{position:relative}
  .anim-confetti-burst::before,.anim-confetti-burst::after{
    content:"";position:absolute;top:50%;left:50%;width:8px;height:8px;border-radius:50%;
    background:var(--accent);box-shadow:
      20px -30px 0 var(--accent-2,var(--accent)),-25px -20px 0 var(--accent-3,var(--accent)),
      30px 20px 0 var(--good,#1aaf6c),-30px 25px 0 var(--warn,#f5a524),
      40px -10px 0 var(--bad,#e0445a),-45px 0 0 var(--accent),
      10px 40px 0 var(--accent-2,var(--accent)),-15px -40px 0 var(--accent-3,var(--accent));
    opacity:0;animation:kf-confetti 1.2s var(--anim-ease) forwards}
  .anim-confetti-burst::after{animation-delay:.15s;transform:rotate(45deg)}
  @keyframes kf-confetti{0%{opacity:0;transform:scale(.2)}30%{opacity:1}100%{opacity:0;transform:scale(2.2)}}
  
  /* ---------- SPOTLIGHT ---------- */
  @keyframes kf-spot{0%{clip-path:circle(0% at 50% 50%)}100%{clip-path:circle(140% at 50% 50%)}}
  .anim-spotlight{animation:kf-spot 1.1s var(--anim-ease) both}
  
  /* ---------- MORPH SHAPE (SVG) ---------- */
  .anim-morph-shape path{animation:kf-morph 6s ease-in-out infinite alternate}
  @keyframes kf-morph{0%{d:path("M60,120 Q120,20 180,120 T300,120")}
    100%{d:path("M60,120 Q120,220 180,120 T300,120")}}
  
  /* ---------- RIPPLE REVEAL ---------- */
  @keyframes kf-ripple{0%{clip-path:circle(0% at 20% 80%);opacity:.4}
    100%{clip-path:circle(160% at 20% 80%);opacity:1}}
  .anim-ripple-reveal{animation:kf-ripple 1.2s var(--anim-ease) both}
  
  /* reduced motion */
  @media (prefers-reduced-motion: reduce){
    [class*="anim-"]{animation:none!important;transition:none!important}
  }