Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scroll indicator with percentage #21

Open
do-web opened this issue Jul 7, 2020 · 1 comment
Open

Scroll indicator with percentage #21

do-web opened this issue Jul 7, 2020 · 1 comment

Comments

@do-web
Copy link

do-web commented Jul 7, 2020

Hi want to create a page scroll percentage indicator:

const animation = new Motus.Animation({
  $el: document.getElementById("app"),
  startPoint: 0,
  endPoint: document.body.offsetHeight,
  keyframes: [
    {width: '100%'} 
  ]
});

But why i can't use 100%? And is this the right approach?

@xch1029
Copy link
Contributor

xch1029 commented May 31, 2021

use motus to create a scroll progress indivator is not a good idea. try this https://www.30secondsofcode.org/css/s/scroll-progress-bar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants