av一区二区在线观看_亚洲男人的天堂网站_日韩亚洲视频_在线成人免费_欧美日韩精品免费观看视频_久草视

您的位置:首頁技術文章
文章詳情頁

python使用tkinter實現屏幕中間倒計時

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

本文實例為大家分享了python實現屏幕中間倒計時的具體代碼,供大家參考,具體內容如下

先看下效果圖:

python使用tkinter實現屏幕中間倒計時

代碼:

import timefrom tkinter import Tk,Labelclass TimeShow():#實現倒計時 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=’倒計時{}秒’.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’]= ’倒計時{}秒’.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()

以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持好吧啦網。

標簽: Python 編程
相關文章:
主站蜘蛛池模板: 中文字幕在线观看第一页 | 久久综合久久久 | a级片播放| 日本精品久久久久久久 | 九九热精品视频 | 色香蕉在线 | 亚洲日本欧美 | 最新中文字幕在线 | 久久精品亚洲成在人线av网址 | 男人av在线播放 | 欧美精品一区在线观看 | 日日干日日色 | 成人精品福利 | 精品一区二区三区四区五区 | 亚洲成人黄色 | 欧美激情视频一区二区三区在线播放 | 在线成人免费观看 | 九色 在线| 懂色中文一区二区在线播放 | 国产精品一区二区免费 | 在线免费黄色 | 亚洲精品一区二区三区 | 天堂三级 | 欧美精品一区免费 | av网站免费在线观看 | 天天射网站 | 在线免费观看a级片 | aaa大片免费观看 | 日韩网站在线观看 | 超碰精品在线 | 一区二区高清 | 国产三区四区 | 欧美成人高清 | 亚洲精品国产一区 | 久久精品av | 欧美一区二区 | 国产欧美精品一区二区色综合朱莉 | 日韩av免费看 | 亚洲欧美一区二区三区视频 | 精品在线免费观看视频 | 成年人在线|