Skip to content

Instantly share code, notes, and snippets.

@BillClinton
Last active November 25, 2019 06:59
Show Gist options
  • Save BillClinton/94e0d2f553ebbf0d8af3e8b348720236 to your computer and use it in GitHub Desktop.
Save BillClinton/94e0d2f553ebbf0d8af3e8b348720236 to your computer and use it in GitHub Desktop.

Notes

Misc

If you animate scale, it's going to animate the content of the div too.

Performance

If you animate height or width it's a huge performance bottleneck

Resources:

https://cubic-bezier.com/

JS animation

var options = {
  iterations: Infinity,
  iterationStart: 0,
  delay: 0,
  endDelay: 0,
  direction: 'alternate',
  duration: 700,
  fill: 'forwards',
  easing: 'ease-out',
}
element.animate(keyframes, options);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment