2010-06-10 13 views
0

,所以我有這個divjquery:將更新號碼轉爲進度條?

<div id="progress">{2 digit number updates here}</div> 

什麼是變成一個進度條的最佳方式?

這樣的事情?

<div id="progress"> 
    <div id="bar" style="width={2 digit number updates here}"></div> 
</div> 

這是'好的'?

回答

2

差不多。你想表達你的更新爲百分比,這樣就可以顯示類似:

<div id="progress" width="400px;"><!-- maximum width of your bar --> 
    <div id="bar" style="width: {percentage complete goes here}%;">&nbsp;</div> 
</div> 
+0

百分比你打我到答案.. :) – 2010-06-10 12:45:22