From 43ea4a3b00843eb483869512aedf4ed3aec08950 Mon Sep 17 00:00:00 2001 From: 10_2 Date: Wed, 8 Jan 2025 10:15:23 +0800 Subject: [PATCH] =?UTF-8?q?Signed-off-by:=2010=5F2=20=20?= =?UTF-8?q?=E8=BF=99=E6=98=AF=E4=B8=80=E4=B8=AA10=5F2=E7=94=B5=E8=84=91?= =?UTF-8?q?=E7=9A=84=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 2025-1-8-1.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/2025-1-8-1.py b/2025-1-8-1.py index c3604f9..aeb62d5 100644 --- a/2025-1-8-1.py +++ b/2025-1-8-1.py @@ -9,13 +9,13 @@ class MovingLabel(threading.Thread): threading.Thread.__init__(self) 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.place(x=800,y=random.randint(10,550)) + self.label.place(x=random.randint(50,800),y=0) def run(self): - x=800 - while x>-200: - x-=2 - self.label.place(x=x) + y=0 + while y<650: + y+=2 + self.label.place(y=y) time.sleep(0.02) self.label.destroy()