Skip to content

Instantly share code, notes, and snippets.

@djmtype
Created February 6, 2021 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djmtype/736029bafbddfddebe35199ce1e2e6ba to your computer and use it in GitHub Desktop.
Save djmtype/736029bafbddfddebe35199ce1e2e6ba to your computer and use it in GitHub Desktop.
@keyframes smoothscroll1 {
from,
to {
scroll-behavior: smooth;
}
}
@keyframes smoothscroll2 {
from,
to {
scroll-behavior: smooth;
}
}
html {
animation: smoothscroll1 1s;
}
html:focus-within {
animation-name: smoothscroll2;
scroll-behavior: smooth;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment