https://cassie.codes
lt me
https://cassie.codes
Simplified SVG markup.
<svg viewBox="0 0 100 100">
<path d="M10 10H90V90H10Z"/>
<circle cx="50" cy="50" r="40"/>
</svg>
lovely semantic elements
.element {
animation-name: fade;
animation-duration: 2s;
}
@keyframes fade {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
transform-origin: 200px 50px;
.element {
transform-box: fill-box
}
.element {
transform-box: view-box
}
.element {
transform-box: fill-box
}
.element {
transform-box: view-box
}
@supports (transform-box: fill-box) {
/*animation code here*/
}
.element {
animation-name: first-animation;
animation-duration: 2s;
}
.element-two {
animation-name: second-animation;
animation-duration: 3s;
animation-delay: 2s;
}
.element-three {
animation-name: third-animation;
animation-duration: 3s;
animation-delay: 5s;
}
.element-four {
animation-name: fourth-animation;
animation-duration: 4s;
animation-delay: 8s;
}
.element-five {
animation-name: fifth-animation;
animation-duration: 12s;
animation-delay: 2s;
}
.element-six {
animation-name: sixth-animation;
animation-duration: 3s;
animation-delay: 14s;
}
π
π
π
Docs & codepens
Β
Docs & codepens
Β
Docs, forums & codepens
Β
MIT
MIT
Core is Free.
Paid plugins
7kB
15kb
23kb
π
π
π
Β
gsap.method(element, duration, vars)
gsap.to(element, duration, vars)
gsap.from(element, duration, vars)
gsap.from(".neopet", duration, vars)
gsap.from(".neopet",2, vars)
gsap.from(".neopet",2,{xPercent: 250})
gsap.from(".neopet",2,{xPercent: 250})
timeline.timeScale(1.5)
timeline.play()
timeline.pause()
timeline.reverse()
Original artist: Salih Abdul-Karim. (done in bodymovin)
const safeToAnimate = window.matchMedia('(prefers-reduced-motion: no-preference)').matches;
if(safeToAnimate) {
lovely safe animation code stuffs
}
@media (prefers-reduced-motion: reduce) {
* {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
Thank you for listening!
@cassiecodes - twitter & codepen