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

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

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

瀏覽:91日期: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 編程
相關文章:
主站蜘蛛池模板: 91精品国产免费久久 | 男人的天堂在线精品视频 | 国产极品喷水视频jk制服 | 日韩精品免费一区二区三区 | 一级毛片aaaaaa免费看 | 日韩欧美亚洲国产 | 亚洲在线免费免费观看视频 | 欧美性f | 一级美国片免费看 | 国产成人精视频在线观看免费 | 国产边打电话边做对白刺激 | 亚洲精品国产拍拍拍拍拍 | 国产亚洲精品成人a在线 | 欧美首页 | 五月激激激综合网色播免费 | 国产成人精品一区二区三区 | 亚洲第一页在线视频 | 女人张开腿等男人桶免费视频 | 91视频最新网站 | 成年黄色网址 | 亚洲理论片在线中文字幕 | 久久精品免费一区二区视 | 欧美成人资源 | 一区二区3区免费视频 | 亚洲国产大片 | 亚洲欧美综合久久 | 国产精品在线播放 | 免费国产精品视频 | 国产精品久久久久三级 | 久草资源在线播放 | 香港台湾经典三级a视频 | xxxwww欧美| 免费观看欧美一级毛片 | 日韩亚洲欧美一区 | 久久亚洲国产高清 | 亚洲视频精品 | 色哟哟国产成人精品 | 九一精品 | 国产4tube在线播放 | av免费网站在线观看 | 国产91丝袜在线播放九色 |