Compare commits
No commits in common. "189af11f07ca1de056c39891b189eda05b314b46" and "87d584ed46438c53a078027f8c57ac2f8de12dd5" have entirely different histories.
189af11f07
...
87d584ed46
|
@ -9,12 +9,13 @@ class MovingLabel(threading.Thread):
|
||||||
threading.Thread.__init__(self)
|
threading.Thread.__init__(self)
|
||||||
self.text=text
|
self.text=text
|
||||||
self.label=tk.Label(window,image=kuang,text=self.text,compound="center",font=("黑体",20),fg="white",width=190,height=45)
|
self.label=tk.Label(window,image=kuang,text=self.text,compound="center",font=("黑体",20),fg="white",width=190,height=45)
|
||||||
self.label.place(x=random.randint(50,800),y=0)
|
self.label.place(x=800,y=random.randint(10,550))
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
y=0
|
x=800
|
||||||
while y<650:
|
while x>-200:
|
||||||
y+=2
|
x-=2
|
||||||
self.label.place(y=y)
|
self.label.place(x=x)
|
||||||
time.sleep(0.02)
|
time.sleep(0.02)
|
||||||
self.label.destroy()
|
self.label.destroy()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue