色综合图-色综合图片-色综合图片二区150p-色综合图区-玖玖国产精品视频-玖玖香蕉视频

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

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

瀏覽:97日期: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()

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

標(biāo)簽: Python 編程
相關(guān)文章:
主站蜘蛛池模板: 久久99国产精一区二区三区! | 久草久在线| www.久草.com| 天天五月天丁香婷婷深爱综合 | 日韩一区二区在线视频 | 国产精品一级毛片不收费 | 国产精品一区高清在线观看 | 日韩美一区二区三区 | 美女视频全部免费 | 一级a毛片免费观看久久精品 | 国产成人综合视频 | 兔子先生节目在线观看免费 | 三级黄色片在线免费观看 | 久久99国产精品久久99 | 美女拍拍拍爽爽爽爽爽爽 | 日韩三级在线观看 | 欧美日韩第三页 | 亚洲午夜网 | 日韩精品在线一区二区 | 欧美一级成人毛片影院 | 亚洲精品欧洲一区二区三区 | 国内精自线一二区 | 美女黄视频网站 | 成人毛片免费视频播放 | 99精品国产在热久久 | 久久国产免费 | 亚洲最新在线 | 久久久国产免费影院 | a毛片成人免费全部播放 | 国产日韩欧美综合一区二区三区 | 久久精品国产亚洲7777 | 毛片在线免费播放 | 又黄又爽又刺激的视频 | 国产v欧美v日韩在线观看 | 国产精品2019 | 免费看欧美成人性色生活片 | 国内精自线一二区 | 免费手机黄色网址 | 久久88| 在线私拍国产福利精品 | 中文无线乱码二三四区 |