简体   繁体   中英

About Progress bar in php

Sir i have created progress bar by using CSS and it works properly but i have to fix the stating and ending time of the progress bar. i will give the static value as end time and present time as starting time it should start from 0% and completes at 100%. But now i am using present time and i use if condition that progress bar should be 0% until it starts and the progress bar started directly jumps to 50% or 70% as per the ending time. so please help me as per this after starting the progress bar should starts from 0%.thank you i used the code as follows.....

$total = $t_time_seconds;
$current = $s_time_seconds;
$percent = round(($current/$total)*100,1);
$remain = $total - $current;

Please help me with this.

If you wish to have a progress bar without adding some code PACE can be an awesome tool for you.

Just include pace.js and a CSS theme of your choice, and you get a beautiful progress indicator for your page load and AJAX navigation. Best thing with PACE is the auto detection of progress.

It contains various themes and color schemes as well.

Worth a try.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM