import tkinter as tk
filename = 'C:\\Users\\i\\Desktop\\background1.png'
root = tk.Tk()
photo = tk.PhotoImage(file=filename)
label1 = tk.Label(root,text='学习python', justify='left',
image=photo,compound='center',font=('微软雅黑',20),fg='white')
label1.pack()
root.mainloop()
tkinter-Label(加载文字图片)
最新推荐文章于 2024-06-12 22:04:35 发布