tkinter窗体半透明效果演示

"""本程序演示了tkinter窗体的半透明效果"""


import math
from turtle import *

width,height=640,640
screen = Screen()
screen.delay(0)
root = screen._root   
本文隐藏内容 登陆 后才可以浏览
def rotate1(): x = 128 * math.cos(math.radians(ball1.angle)) y = 128 * math.sin(math.radians(ball1.angle)) ball1.goto(x,y) ball1.angle = ball1.angle + 1 ball1.angle = ball1.angle % 360 screen.ontimer(rotate1,10) rotate1() def rotate2(): x = 256 * math.cos(math.radians(ball2.angle)) y = 256 * math.sin(math.radians(ball2.angle)) ball2.goto(x,y) ball2.angle = ball2.angle + 1 ball2.angle = ball2.angle % 360 screen.ontimer(rotate2,10) rotate2() screen.exitonclick() # 单击关闭窗口

python演示了tkinte窗体的半透明效果