国产成人精品久久免费动漫-国产成人精品天堂-国产成人精品区在线观看-国产成人精品日本-a级毛片无码免费真人-a级毛片毛片免费观看久潮喷

您的位置:首頁技術(shù)文章
文章詳情頁

python使用tkinter實(shí)現(xiàn)屏幕中間倒計(jì)時(shí)

瀏覽:86日期:2022-06-26 09:30:43

本文實(shí)例為大家分享了python實(shí)現(xiàn)屏幕中間倒計(jì)時(shí)的具體代碼,供大家參考,具體內(nèi)容如下

先看下效果圖:

python使用tkinter實(shí)現(xiàn)屏幕中間倒計(jì)時(shí)

代碼:

import timefrom tkinter import Tk,Labelclass TimeShow():#實(shí)現(xiàn)倒計(jì)時(shí) def __init__(self,time_show=5): self.timeShowWin=Tk() self.timeShowWin.overrideredirect(True) self.timeShowWin.attributes(’-alpha’,1) self.timeShowWin.attributes(’-topmost’,True) self.timeShowWin.attributes(’-transparentcolor’,’black’) self.time_show = time_show self.time_label=Label(self.timeShowWin,text=’倒計(jì)時(shí){}秒’.format(self.time_show),font=(’楷體’,25),fg=’red’,bg=’black’) self.time_label.pack(fill=’x’,anchor=’center’) self.timeShowWin.geometry(’+’+str(int(self.timeShowWin.winfo_screenwidth()/2))+’+’+str(125)) self.timeShowWin.after(1,self.show) def show(self): while self.time_show >= 0: print(’time_label={}’.format(self.time_label)) self.time_label[’text’]= ’倒計(jì)時(shí){}秒’.format(self.time_show) self.timeShowWin.update() self.time_show -= 1 time.sleep(1) self.timeShowWin.destroy() def start(self): print(’ok’) self.timeShowWin.mainloop() if __name__ == ’__main__’: a=TimeShow(10) a.start()

以上就是本文的全部內(nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持好吧啦網(wǎng)。

標(biāo)簽: Python 編程
相關(guān)文章:
主站蜘蛛池模板: 草草在线观看视频 | 大片毛片 | 亚洲制服丝袜美腿亚洲一区 | 国产91网址 | 26uuu欧美日韩国产 | 视频亚洲一区 | 欧美精品成人一区二区视频一 | 久久高清免费视频 | 九九在线免费视频 | 免费伦费一区二区三区四区 | 神马午夜视频 | 欧美在线观看成人高清视频 | 欧美成人性色生活片天天看 | 免费看欧美毛片大片免费看 | 亚洲精品国产一区二区图片欧美 | 91男女视频 | 国产在线观看第一页 | 欧美一级毛片不卡免费观看 | 国内成人自拍 | 国产亚洲综合成人91精品 | 亚洲一区二区影院 | 偷拍自拍日韩 | 午夜影院a级片 | 国产精品合集一区二区 | 日韩一级片网址 | 最刺激黄a大片免费观看 | 久久久国产精品视频 | 国产呦精品一区二区三区网站 | 久久精品视频免费看 | 91情侣高清精品国产 | 免费观看毛片视频 | 国产欧美日韩精品第二区 | 欧美午夜视频一区二区 | 午夜综合网 | 成人免费午夜性视频 | 久久99精品久久久久久久野外 | 欧美高清在线视频一区二区 | 欧美日韩永久久一区二区三区 | 俄罗斯一级成人毛片 | 怡红院亚洲怡红院首页 | 国产精品免费综合一区视频 |