Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7662587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:50:18+00:00 2026-05-31T13:50:18+00:00

i am trying to have a horizontal progress bar, for which, it starts with

  • 0

i am trying to have a horizontal progress bar, for which, it starts with full, and ends empty to simulate the 30 seconds timer.
that is, at time 0:30, the progress bar is full, at 0:29, the progress bar should decrease proportionally.

handling animation is a pain, so i decide to use the css 3 animation which mozilla supports

so basically this is what i have

 .progress-bar {
    height: 8px;
    width: 0;
    background: -moz-linear-gradient(top,  #00679A 0%, #FFFFFF 30%, #00679A 100%);
    margin: 0px 4px;
    -moz-animation-duration: 30s;  
    -moz-animation-name: update;      
  }

 @-moz-keyframes update {
   0% {width: 100%;} 
   50% {width: 50%;}
   100% {width: 0%;}
 }

two issues with this approach, if you know answer to any one of those, please don’t hesitate to reply

  1. there is actually a numeric counter counting down (from 0:30 to 0:00), it is supposed to in sync with the css animation progress bar pasted above…but the progress bar actually start animating (once shown) before the numerical counter one (via javascript), does mozilla have something like i can tell it when to start animating?

  2. although the duration of the animation is set at 30 seconds…but the ‘tempo’ looks weird, it starts animating fast, and then slow….and it doesn’t make sense because the numeric timer shows u have more than half time left (i.e. > 15) but then the progress bar is already less than half gone….at the end it still finishes animating at time 0…it is weird. for ‘update’ css selector above, if i hard code every percentage i.e. from 0% to 100% it is better, but still the ‘tempo’ doesn’t look correct…anyway i can fix this??

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T13:50:20+00:00Added an answer on May 31, 2026 at 1:50 pm

    For problem #1, you will want to do something like this:

    .progress-bar {
      height: 8px;
      width: 0;
      background: -moz-linear-gradient(top,  #00679A 0%, #FFFFFF 30%, #00679A 100%);
      margin: 0px 4px;
    }
    
    .start-animating {
      -moz-animation-duration: 30s;  
      -moz-animation-name: update;      
    }
    
    // When you're ready
    $(".progress-bar").addClass("start-animating");
    

    For problem #2, you will want to change the transition function to linear; it defaults to ease:

    .start-animating {
      -moz-animation-duration: 30s;  
      -moz-animation-name: update;
      -moz-animation-timing-function: linear;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to have a horizontal navigation bar that has equally spaced links spanning across
Starting point: End point: I'm trying to have a horizontal navigation bar that fills
I have a simple horizontal UL LI main nav which I am trying to
I'm trying to make a flexible, horizontal menu that will always have a total
I have a horizontal nav that looks as follows: I'm trying to remove the
I am trying to make a matplotlib figure that will have multiple horizontal boxplots
I have nested li, which is for horizontal subnav menu. I am trying to
I am trying to create a mini progress bar that will indicate how much
I am trying to create downloading progress. I have my class which extends AsyncTask:
I have been trying to make the sub-menu horizontal. In my HTML it looks

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.