ae長(zhǎng)時(shí)間倒計(jì)時(shí)的改進(jìn)
2023-06-15 22:45 作者:可囿于晝夜廚房與愛(ài) | 我要投稿
新建三個(gè)文本,打開(kāi)表達(dá)式,分別復(fù)制進(jìn)去,在自己調(diào)整一下位置就好了。
小時(shí):
t=Math.round(outPoint-time);
minut=Math.floor(t/60);
hour=Math.floor(minut/60);
if(hour<10)
{
['0'+hour]
}
else
[hour]
分鐘:(這個(gè)很多網(wǎng)上的教程會(huì)出現(xiàn)01:65或者01:012這種樣子,這個(gè)做了修改)
t=Math.round(outPoint-time);
minut=Math.floor(t/60);
n=Math.floor(minut/60);
if(minut>=n*60,minut<n*60+10)
{
if(minut<=59)
{
if(minut<10)
{
['0'+minut]
}
? ? ? ? else
? ? ? ? value
}
else
['0'+(minut-n*60)]
}
else
[(minut-n*60)]
秒的:
t=Math.round(outPoint-time);
second=t%60;
if(second<10)
{
['0'+second]
}
else
[second]
標(biāo)簽: