課程
/前端開發(fā)
/Html5
/炫麗的倒計(jì)時(shí)效果Canvas繪圖與動(dòng)畫基礎(chǔ)
var seconds=curShowTimeSeconds%60;
為什么要取余數(shù)?curShowTimeSeconds是整總的秒數(shù),%60之后得到了什么?
2017-03-14
源自:炫麗的倒計(jì)時(shí)效果Canvas繪圖與動(dòng)畫基礎(chǔ) 3-3
正在回答
curShowTimeSeconds%60取余數(shù),得到的余數(shù)就是不足1分鐘的秒數(shù),就是最后要顯示的秒數(shù)
舉報(bào)
學(xué)習(xí)HTML5中最激動(dòng)人心的技術(shù)Canvas,徹底釋放自己的創(chuàng)造力
1 回答為什么不直接使用curShowTimeSeconds = getCurShowTimeSeconds()
4 回答直接修改curShowTimeSeconds為什么不出效果,不明白
2 回答為什么不直接把curShowTimeSeconds = getCurrentShowTimeSeconds();放到render函數(shù)中
1 回答nextShowTimeSeconds和curShowTimeSeconds調(diào)用的函數(shù)相同,為何返回值會(huì)不同,
1 回答nextShowTimeSeconds和curShowTimeSeconds不是一樣的嗎?都是getCurrentShowTimeSeconds()的值,為什么還要比較?
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2017-03-15
curShowTimeSeconds%60取余數(shù),得到的余數(shù)就是不足1分鐘的秒數(shù),就是最后要顯示的秒數(shù)