{"id":78,"date":"2025-11-05T23:40:36","date_gmt":"2025-11-05T15:40:36","guid":{"rendered":"https:\/\/blog.genan.top\/?p=78"},"modified":"2025-11-21T09:04:51","modified_gmt":"2025-11-21T01:04:51","slug":"%e5%bf%83%e5%bd%a2%e5%88%9b%e6%84%8f%e5%bc%b9%e7%aa%97%e4%bb%a3%e7%a0%81%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/blog.genan.top\/?p=78","title":{"rendered":"\u5fc3\u5f62\u521b\u610f\u5f39\u7a97\u4ee3\u7801\u8be6\u89e3"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>import tkinter as tk  # \u5bfc\u5165tkinter\u5e93\u5e76\u7b80\u79f0\u4e3atk\uff0c\u8fd9\u662fPython\u7684\u6807\u51c6GUI\u5e93\n\ndef createWindow():\n    # \u521b\u5efaTk\u7c7b\u7684\u5b9e\u4f8b - \u8fd9\u662f\u4f60\u7684\u4e3b\u7a97\u53e3\u5bf9\u8c61\n    # \u6ce8\u610f\uff1aTk()\u662f\u6784\u9020\u51fd\u6570\u8c03\u7528\uff0c\u4e0d\u662f\u666e\u901a\u51fd\u6570\n    window = tk.Tk()\n\n    # \u8bbe\u7f6e\u7a97\u53e3\u6807\u9898 - \u8c03\u7528window\u5bf9\u8c61\u7684title\u65b9\u6cd5\n    window.title(\"\u8fd9\u662f\u6211\u7684\u7b2c\u4e00\u4e2a\u7a97\u53e3\")\n    \n    # \u8bbe\u7f6e\u7a97\u53e3\u5927\u5c0f\u548c\u4f4d\u7f6e\n    # \"300x200\"\u8868\u793a\u7a97\u53e3\u5bbd300\u50cf\u7d20\uff0c\u9ad8200\u50cf\u7d20\n    # \"+500+300\"\u8868\u793a\u7a97\u53e3\u8ddd\u79bb\u5c4f\u5e55\u5de6\u8fb9\u754c500\u50cf\u7d20\uff0c\u4e0a\u8fb9\u754c300\u50cf\u7d20\n    window.geometry(\"300x200+500+300\")\n    \n    # \u521b\u5efaLabel\u7c7b\u7684\u5b9e\u4f8b\uff08\u6807\u7b7e\u5bf9\u8c61\uff09\n    # text\u53c2\u6570\u8bbe\u7f6e\u6807\u7b7e\u663e\u793a\u7684\u6587\u672c\u5185\u5bb9\n    label = tk.Label(window, text=\"\u8fd9\u662f\u4e00\u4e2a\u6807\u7b7e\")\n    \n    # \u8c03\u7528pack()\u65b9\u6cd5\u8fdb\u884c\u5e03\u5c40\u7ba1\u7406\n    # \u6ca1\u6709\u8fd9\u884c\uff0c\u6807\u7b7e\u867d\u7136\u5b58\u5728\u4f46\u4e0d\u4f1a\u663e\u793a\u51fa\u6765\n    label.pack()\n\n    # \u542f\u52a8GUI\u4e3b\u4e8b\u4ef6\u5faa\u73af\n    # \u8fd9\u884c\u4ee3\u7801\u8ba9\u7a97\u53e3\u4fdd\u6301\u663e\u793a\u72b6\u6001\uff0c\u7b49\u5f85\u7528\u6237\u64cd\u4f5c\n    # \u6ca1\u6709\u8fd9\u884c\uff0c\u7a97\u53e3\u4f1a\u77ac\u95f4\u95ea\u9000\n    window.mainloop()\n\n# \u8c03\u7528\u51fd\u6570\uff0c\u5b9e\u9645\u521b\u5efa\u5e76\u663e\u793a\u7a97\u53e3\ncreateWindow()<\/code><\/pre>\n\n\n\n<p>1\u3001\u901a\u8fc7\u4e0a\u8ff0\u4ee3\u7801\uff0c\u5373\u53ef\u5b9e\u73b0\u7b2c\u4e00\u6b65\uff0c\u5f39\u7a97\uff0c\u8fd9\u4e2a\u5f39\u7a97\u5305\u62ec\u4e00\u4e2a\u6807\u9898\u548c\u6587\u672c\u5185\u5bb9\uff0c\u4e14\u5728geometry\u4e2d\u53ef\u4ee5\u6309\u9700\u4fee\u6539\u7a97\u53e3\u7684\u5927\u5c0f\u548c\u4f4d\u7f6e\u3002<\/p>\n\n\n\n<p>2\u3001\u63a5\u4e0b\u6765\u6211\u4eec\u5f00\u59cb\u8bbe\u8ba1\u5fc3\u5f62\u7a97\u53e3\u7684\u989c\u8272\u548c\u6587\u5b57\u3002\u9700\u8981\u8fbe\u5230\u7684\u6548\u679c\u662f\u6bcf\u4e2a\u5f39\u7a97\u90fd\u662f\u968f\u673a\u7684\u4e00\u53e5\u8bdd\uff0c\u4e14\u80cc\u666f\u989c\u8272\u4e5f\u4e0d\u540c\uff0c\u6240\u4ee5\u8fd9\u91cc\u7684\u903b\u8f91\u662f\u6211\u4eec\u4f7f\u7528\u4e24\u4e2a\u5217\u8868tips\u548ccolors\u6765\u653e\u7f6e\u9700\u8981\u6587\u5b57\u548c\u989c\u8272\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    # \u968f\u673a\u6587\u5b57\n    tips = &#91;\n        \"\u5929\u51b7\u591a\u7a7f\u8863\u670d\", \"\u591a\u559d\u70ed\u6c34\", \"\u8981\u5403\u70ed\u996d\", \"\u6211\u60f3\u4f60\u4e86\",\n        \"\u4fdd\u6301\u5fae\u7b11~~~(^v^)~~~\", \"\u4fdd\u6301\u597d\u5fc3\u60c5\u5440\", \"\u597d\u597d\u7231\u81ea\u5df1\", \"\u68a6\u60f3\u6210\u771f\",\n        \"\u522b\u71ac\u591c\", \"\u6240\u6709\u7684\u70e6\u607c\u90fd\u6d88\u5931\", \"\u8eab\u4f53\u500d\u513f\u68d2\", \"\u5403\u561b\u561b\u9999\",\n        \"\u6bcf\u5929\u90fd\u8981\u5143\u6c14\u6ee1\u6ee1\", \"\u5347\u804c\u52a0\u85aa!\", \"\u671f\u5f85\u4e0b\u6b21\u89c1\u9762\"\n    ]\n\n    # \u968f\u673a\u989c\u8272\n    colors = &#91;\n        'lightpink', 'skyblue', 'lightgreen', 'lavender',\n        'lightyellow', 'plum', 'coral', 'bisque', 'aquamarine',\n        'mistyrose', 'honeydew', 'lavenderblush', 'oldlace'\n    ]\n    # \u4f7f\u7528random\u6a21\u5757\u7684choice\u51fd\u6570\uff0c\u4ececolors\u5217\u8868\u4e2d\u968f\u673a\u62bd\u53d6\u4e00\u4e2a\u989c\u8272\u503c\uff0c\u5e76\u5c06\u7ed3\u679c\u8d4b\u503c\u7ed9color\u53d8\u91cf\n    color = random.choice(colors)\n\n    window.configure(background=color)\n    label = tk.Label(\n        window,\n        text=random.choice(tips),\n        bg=color,\n        font=(\"\u5fae\u8f6f\u96c5\u9ed1\", 16, \"bold\")\n    )\n    label.pack()\n<\/code><\/pre>\n\n\n\n<p>\u6240\u4ee5\u628a\u8fd9\u6bb5\u653e\u5728createWindow\u7684\u51fd\u6570\u4e2d\uff0c\u5b8c\u6574\u4ee3\u7801\u4e3a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def CreateWindow(x, y, root):\n    \"\"\"\u521b\u5efa\u5355\u4e2a\u5f39\u7a97\"\"\"\n    # \u521b\u5efa\u4e00\u4e2a\u65b0\u7a97\u53e3\uff08Toplevel\u7528\u4e8e\u521b\u5efa\u5b50\u7a97\u53e3\uff0cTk\u7528\u4e8e\u521b\u5efa\u4e3b\u7a97\u53e3\uff09\n    window = tk.Toplevel()\n    window.title(\"\u4f60\u597d\u5440~\")  # \u8bbe\u7f6e\u7a97\u53e3\u6807\u9898\n\n    # \u968f\u673a\u6587\u5b57\u5217\u8868 - \u5305\u542b\u5404\u79cd\u6e29\u99a8\u7684\u63d0\u793a\u8bed\n    tips = &#91;\n        \"\u5929\u51b7\u591a\u7a7f\u8863\u670d\", \"\u591a\u559d\u70ed\u6c34\", \"\u8981\u5403\u70ed\u996d\", \"\u6211\u60f3\u4f60\u4e86\",\n        \"\u4fdd\u6301\u5fae\u7b11~~~(^v^)~~~\", \"\u4fdd\u6301\u597d\u5fc3\u60c5\u5440\", \"\u597d\u597d\u7231\u81ea\u5df1\", \"\u68a6\u60f3\u6210\u771f\",\n        \"\u522b\u71ac\u591c\", \"\u6240\u6709\u7684\u70e6\u607c\u90fd\u6d88\u5931\", \"\u8eab\u4f53\u500d\u513f\u68d2\", \"\u5403\u561b\u561b\u9999\",\n        \"\u6bcf\u5929\u90fd\u8981\u5143\u6c14\u6ee1\u6ee1\", \"\u5347\u804c\u52a0\u85aa!\", \"\u671f\u5f85\u4e0b\u6b21\u89c1\u9762\"\n    ]\n\n    # \u968f\u673a\u989c\u8272\u5217\u8868 - \u5305\u542b\u5404\u79cd\u67d4\u548c\u7684\u989c\u8272\n    colors = &#91;\n        'lightpink', 'skyblue', 'lightgreen', 'lavender',\n        'lightyellow', 'plum', 'coral', 'bisque', 'aquamarine',\n        'mistyrose', 'honeydew', 'lavenderblush', 'oldlace'\n    ]\n    color = random.choice(colors)  # \u4ece\u989c\u8272\u5217\u8868\u4e2d\u968f\u673a\u9009\u62e9\u4e00\u4e2a\u989c\u8272\n\n    # \u8bbe\u7f6e\u7a97\u53e3\u7684\u80cc\u666f\u989c\u8272\n    window.configure(background=color)\n    \n    # \u521b\u5efa\u6807\u7b7e\u63a7\u4ef6\uff08\u7528\u4e8e\u663e\u793a\u6587\u5b57\uff09\n    label = tk.Label(\n        window,                    # \u6307\u5b9a\u8fd9\u4e2a\u6807\u7b7e\u5c5e\u4e8e\u54ea\u4e2a\u7a97\u53e3\n        text=random.choice(tips),  # \u4ece\u63d0\u793a\u8bed\u5217\u8868\u4e2d\u968f\u673a\u9009\u62e9\u4e00\u6761\u6587\u5b57\n        bg=color,                  # \u8bbe\u7f6e\u6807\u7b7e\u80cc\u666f\u989c\u8272\uff08\u4e0e\u7a97\u53e3\u80cc\u666f\u76f8\u540c\uff09\n        font=(\"\u5fae\u8f6f\u96c5\u9ed1\", 16, \"bold\")  # \u8bbe\u7f6e\u5b57\u4f53\uff1a\u5fae\u8f6f\u96c5\u9ed1\uff0c16\u53f7\uff0c\u7c97\u4f53\n    )\n    label.pack()  # \u5c06\u6807\u7b7e\u653e\u7f6e\u5230\u7a97\u53e3\u4e2d\uff08pack\u662f\u7b80\u5355\u7684\u5e03\u5c40\u7ba1\u7406\u5668\uff09<\/code><\/pre>\n\n\n\n<p>3\u3001\u63a5\u4e0b\u6765\u6211\u4eec\u5c31\u8981\u8003\u8651\u5982\u4f55\u8ba9\u5f39\u7a97\u7684\u8f68\u8ff9\u5f62\u6210\u4e00\u4e2a\u2665\u7684\u5f62\u72b6\uff0c\u8fd9\u91cc\u9700\u8981\u5f15\u5165\u4e00\u4e2apython\u5e93math\uff0c\u9700\u8981\u7528\u5230\u2665\u5f62\u7684\u51fd\u6570\uff0c\u5177\u4f53\u4ee3\u7801\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def heart_coordinates(num_points):\n    \"\"\"\n    \u8ba1\u7b97\u6807\u51c6\u5fc3\u5f62\u5750\u6807\n    \u77e5\u8bc6\u70b9\uff1a\u4f7f\u7528\u53c2\u6570\u65b9\u7a0b\u8ba1\u7b97\u5fc3\u5f62\u66f2\u7ebf\uff0ct\u4ece0\u52302\u03c0\u5747\u5300\u5206\u5e03\n    \u6570\u5b66\u516c\u5f0f\uff1ax = 16 * sin\u00b3(t), y = 13*cos(t) - 5*cos(2t) - 2*cos(3t) - cos(4t)\n    \"\"\"\n    points = &#91;]  # \u521b\u5efa\u7a7a\u5217\u8868\u5b58\u50a8\u5750\u6807\u70b9\n    for i in range(num_points):\n        # \u5c06\u5706\u5468\u7b49\u5206\u4e3anum_points\u4efd\uff0ct\u4ece0\u52302\u03c0\u5747\u5300\u53d6\u503c\n        t = 2 * math.pi * i \/ num_points\n        \n        # \u5fc3\u5f62\u66f2\u7ebf\u7684\u53c2\u6570\u65b9\u7a0b\n        x = 16 * (math.sin(t) ** 3)  # x\u5750\u6807\u8ba1\u7b97\n        y = 13 * math.cos(t) - 5 * math.cos(2 * t) - 2 * math.cos(3 * t) - math.cos(4 * t)  # y\u5750\u6807\u8ba1\u7b97\n        \n        points.append((x, y))  # \u5c06\u5750\u6807\u70b9\u4ee5\u5143\u7ec4\u5f62\u5f0f\u6dfb\u52a0\u5230\u5217\u8868\u4e2d\n    \n    return points  # \u8fd4\u56de\u6240\u6709\u5750\u6807\u70b9\u7684\u5217\u8868<\/code><\/pre>\n\n\n\n<p>4\u3001\u7136\u540e\u6211\u4eec\u5c31\u8003\u8651\u5982\u4f55\u8ba9\u5f39\u7a97\u7684\u8f68\u8ff9\u8fde\u7eed\u5f62\u6210\u4e00\u4e2a\u5fc3\u5f62\u4e86\u3002\u4ee5\u4e0b\u662f\u8fde\u7eed\u751f\u6210\u8f68\u8ff9\u7684\u4ee3\u7801\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def create_heart_sequence():\n    \"\"\"\n    \u521b\u5efa\u5fc3\u5f62\u5e8f\u5217\u7a97\u53e3 - \u4e3b\u63a7\u5236\u51fd\u6570\n    \u77e5\u8bc6\u70b9\uff1a\u4f7f\u7528after()\u5b9e\u73b0\u5b9a\u65f6\u5668\u529f\u80fd\uff0cnonlocal\u58f0\u660e\u5916\u90e8\u53d8\u91cf\uff0c\u9012\u5f52\u8c03\u7528\u5b9e\u73b0\u5faa\u73af\n    \"\"\"\n    # \u83b7\u53d6\u5c4f\u5e55\u4fe1\u606f\n    screen_width, screen_height = get_screen_resolution()\n    print(f\"\u5c4f\u5e55\u5206\u8fa8\u7387: {screen_width}x{screen_height}\")  # \u6253\u5370\u5206\u8fa8\u7387\u4fe1\u606f\n\n    # \u8ba1\u7b97\u5fc3\u5f62\u5750\u6807\u70b9\n    points = heart_coordinates(60)  # \u751f\u621060\u4e2a\u5fc3\u5f62\u8f68\u8ff9\u70b9\n\n    # \u521b\u5efa\u9690\u85cf\u7684\u4e3b\u63a7\u5236\u7a97\u53e3\n    # \u77e5\u8bc6\u70b9\uff1aTk()\u521b\u5efa\u4e3b\u7a97\u53e3\uff0cwithdraw()\u9690\u85cf\u7a97\u53e3\n    root = tk.Tk()        # \u521b\u5efa\u4e3b\u7a97\u53e3\u5bf9\u8c61\uff08\u7a0b\u5e8f\u7684\u6838\u5fc3\uff09\n    root.withdraw()       # \u9690\u85cf\u4e3b\u7a97\u53e3\uff08\u4e0d\u663e\u793a\u5728\u5c4f\u5e55\u4e0a\uff09\n\n    current_index = 0  # \u5f53\u524d\u5904\u7406\u7684\u5750\u6807\u70b9\u7d22\u5f15\n\n    def create_next_window():\n        \"\"\"\n        \u9012\u5f52\u51fd\u6570\uff1a\u521b\u5efa\u4e0b\u4e00\u4e2a\u7a97\u53e3\n        \u77e5\u8bc6\u70b9\uff1anonlocal\u58f0\u660e\u4f7f\u7528\u5916\u90e8\u51fd\u6570\u7684\u53d8\u91cf\uff0cafter()\u5b9e\u73b0\u5ef6\u8fdf\u6267\u884c\n        \"\"\"\n        nonlocal current_index  # \u58f0\u660e\u4f7f\u7528\u5916\u90e8\u51fd\u6570\u7684current_index\u53d8\u91cf\n        \n        # \u5982\u679c\u8fd8\u6709\u672a\u5904\u7406\u7684\u5750\u6807\u70b9\n        if current_index &lt; len(points):\n            x, y = points&#91;current_index]  # \u83b7\u53d6\u5f53\u524d\u5750\u6807\u70b9\n            \n            # \u521b\u5efa\u5fc3\u5f62\u7a97\u53e3\n            create_heart_window(x, y, root, screen_width, screen_height)\n            \n            current_index += 1  # \u79fb\u52a8\u5230\u4e0b\u4e00\u4e2a\u5750\u6807\u70b9\n            \n            # \u77e5\u8bc6\u70b9\uff1aafter(\u6beb\u79d2\u6570, \u51fd\u6570, \u53c2\u6570)\u5b9e\u73b0\u5b9a\u65f6\u5668\u529f\u80fd\n            root.after(350, create_next_window)  # 350\u6beb\u79d2\u540e\u518d\u6b21\u8c03\u7528\u81ea\u5df1\n    \n    # \u7acb\u5373\u5f00\u59cb\u751f\u6210\u5e8f\u5217\n    # \u77e5\u8bc6\u70b9\uff1aafter(100, create_next_window)\u8868\u793a100\u6beb\u79d2\u540e\u5f00\u59cb\u6267\u884c\n    root.after(100, create_next_window)  # \u7ed9\u7a0b\u5e8f\u521d\u59cb\u5316\u65f6\u95f4\uff0c\u7136\u540e\u5f00\u59cb\u521b\u5efa\u7a97\u53e3\n    \n    # \u77e5\u8bc6\u70b9\uff1amainloop()\u542f\u52a8GUI\u4e3b\u4e8b\u4ef6\u5faa\u73af\uff0c\u4fdd\u6301\u7a0b\u5e8f\u8fd0\u884c\n    root.mainloop()  # \u8fdb\u5165\u4e3b\u5faa\u73af\uff0c\u7b49\u5f85\u4e8b\u4ef6\u53d1\u751f<\/code><\/pre>\n\n\n\n<p>\u603b\u7ed3\uff1a\u6700\u540e\u7684\u4e3b\u4f53\u4ee3\u7801\u4e3a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import tkinter as tk\nimport random\nimport math\n\ntips = &#91;\n    \"\u5929\u51b7\u591a\u7a7f\u8863\u670d\", \"\u591a\u559d\u70ed\u6c34\", \"\u8981\u5403\u70ed\u996d\", \"\u6211\u60f3\u4f60\u4e86\",\n    \"\u4fdd\u6301\u5fae\u7b11~~~(^v^)~~~\", \"\u4fdd\u6301\u597d\u5fc3\u60c5\u5440\", \"\u597d\u597d\u7231\u81ea\u5df1\", \"\u68a6\u60f3\u6210\u771f\",\n    \"\u522b\u71ac\u591c\", \"\u6240\u6709\u7684\u70e6\u607c\u90fd\u6d88\u5931\", \"\u8eab\u4f53\u500d\u513f\u68d2\", \"\u5403\u561b\u561b\u9999\",\n    \"\u6bcf\u5929\u90fd\u8981\u5143\u6c14\u6ee1\u6ee1\", \"\u5347\u804c\u52a0\u85aa!\", \"\u671f\u5f85\u4e0b\u6b21\u89c1\u9762\"\n]\n\ncolors = &#91;\n    'lightpink', 'skyblue', 'lightgreen', 'lavender',\n    'lightyellow', 'plum', 'coral', 'bisque', 'aquamarine',\n    'mistyrose', 'honeydew', 'lavenderblush', 'oldlace'\n]\n\n\ndef get_screen_resolution():\n    \"\"\"\u83b7\u53d6\u5c4f\u5e55\u5206\u8fa8\u7387\"\"\"\n    root = tk.Tk()\n    root.withdraw()\n    screen_width = root.winfo_screenwidth()\n    screen_height = root.winfo_screenheight()\n    root.destroy()\n    return screen_width, screen_height\n\n\ndef heart_coordinates(num_points):\n    \"\"\"\u6807\u51c6\u5fc3\u5f62\u5750\u6807\"\"\"\n    points = &#91;]\n    for i in range(num_points):\n        t = 2 * math.pi * i \/ num_points\n        x = 16 * (math.sin(t) ** 3)\n        y = 13 * math.cos(t) - 5 * math.cos(2 * t) - 2 * math.cos(3 * t) - math.cos(4 * t)\n        points.append((x, y))\n    return points\n\n\ndef create_heart_window(x, y, root, screen_width, screen_height):\n    \"\"\"\u521b\u5efa\u5355\u4e2a\u5fc3\u5f62\u7a97\u53e3\"\"\"\n    # \u5750\u6807\u8f6c\u6362\n    scale_factor = min(screen_width, screen_height) \/ 1500\n    screen_x = int(x * 30 * scale_factor + screen_width \/ 2)\n    screen_y = int(-y * 30 * scale_factor + screen_height \/ 2)\n\n    # \u521b\u5efa\u7a97\u53e3\n    window = tk.Toplevel()\n    window.title(\"\u4f60\u597d\u5440~\")\n    window.geometry(f\"250x100+{screen_x}+{screen_y}\")\n\n    # \u968f\u673a\u9009\u62e9\u989c\u8272\u548c\u6587\u5b57\n    color = random.choice(colors)\n    text = random.choice(tips)\n\n    # \u8bbe\u7f6e\u7a97\u53e3\u6837\u5f0f\n    window.configure(background=color)\n    label = tk.Label(\n        window,\n        text=text,\n        bg=color,\n        font=(\"\u5fae\u8f6f\u96c5\u9ed1\", 16, \"bold\")\n    )\n    label.pack()\n\n    # \u7ed1\u5b9a\u5173\u95ed\u4e8b\u4ef6\n    def on_closing():\n        root.destroy()\n    window.protocol(\"WM_DELETE_WINDOW\", on_closing)\n\n\ndef create_heart_sequence():\n    \"\"\"\u521b\u5efa\u5fc3\u5f62\u5e8f\u5217\u7a97\u53e3\"\"\"\n    # \u83b7\u53d6\u5c4f\u5e55\u4fe1\u606f\n    screen_width, screen_height = get_screen_resolution()\n    print(f\"\u5c4f\u5e55\u5206\u8fa8\u7387: {screen_width}x{screen_height}\")\n\n    # \u8ba1\u7b97\u5fc3\u5f62\u5750\u6807\n    points = heart_coordinates(60)\n\n    # \u521b\u5efa\u9690\u85cf\u7684\u4e3b\u63a7\u5236\u7a97\u53e3\n    root = tk.Tk()\n    root.withdraw()\n\n    current_index = 0\n\n    def create_next_window():\n        nonlocal current_index\n        if current_index &lt; len(points):\n            x, y = points&#91;current_index]\n            create_heart_window(x, y, root, screen_width, screen_height)\n            current_index += 1\n            root.after(350, create_next_window)  # 350ms\u540e\u521b\u5efa\u4e0b\u4e00\u4e2a\n\n    # \u7acb\u5373\u5f00\u59cb\u751f\u6210\n    root.after(100, create_next_window)\n    root.mainloop()\n\n\n# \u8fd0\u884c\u5fc3\u5f62\u5e8f\u5217\ncreate_heart_sequence()<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001\u901a\u8fc7\u4e0a\u8ff0\u4ee3\u7801\uff0c\u5373\u53ef\u5b9e\u73b0\u7b2c\u4e00\u6b65\uff0c\u5f39\u7a97\uff0c\u8fd9\u4e2a\u5f39\u7a97\u5305\u62ec\u4e00\u4e2a\u6807\u9898\u548c\u6587\u672c\u5185\u5bb9\uff0c\u4e14\u5728geometry\u4e2d\u53ef\u4ee5\u6309\u9700\u4fee\u6539\u7a97\u53e3\u7684\u5927\u5c0f\u548c\u4f4d\u7f6e\u3002 2\u3001\u63a5\u4e0b\u6765\u6211\u4eec\u5f00\u59cb\u8bbe\u8ba1\u5fc3\u5f62\u7a97\u53e3\u7684\u989c\u8272\u548c\u6587\u5b57\u3002\u9700\u8981\u8fbe\u5230\u7684\u6548\u679c\u662f\u6bcf\u4e2a\u5f39\u7a97\u90fd\u662f\u968f\u673a\u7684\u4e00\u53e5\u8bdd\uff0c\u4e14\u80cc\u666f\u989c\u8272\u4e5f\u4e0d\u540c\uff0c\u6240\u4ee5\u8fd9\u91cc\u7684\u903b\u8f91\u662f\u6211\u4eec\u4f7f\u7528\u4e24\u4e2a\u5217\u8868tips\u548ccolors\u6765\u653e\u7f6e\u9700\u8981\u6587\u5b57\u548c\u989c\u8272\u3002 \u6240\u4ee5\u628a\u8fd9\u6bb5\u653e\u5728createWindow\u7684\u51fd\u6570\u4e2d\uff0c\u5b8c\u6574\u4ee3\u7801\u4e3a\uff1a 3\u3001\u63a5\u4e0b\u6765\u6211\u4eec\u5c31\u8981\u8003\u8651\u5982\u4f55\u8ba9\u5f39 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-78","post","type-post","status-publish","format-standard","hentry","category-3"],"_links":{"self":[{"href":"https:\/\/blog.genan.top\/index.php?rest_route=\/wp\/v2\/posts\/78","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.genan.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.genan.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.genan.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.genan.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=78"}],"version-history":[{"count":2,"href":"https:\/\/blog.genan.top\/index.php?rest_route=\/wp\/v2\/posts\/78\/revisions"}],"predecessor-version":[{"id":81,"href":"https:\/\/blog.genan.top\/index.php?rest_route=\/wp\/v2\/posts\/78\/revisions\/81"}],"wp:attachment":[{"href":"https:\/\/blog.genan.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=78"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.genan.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=78"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.genan.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=78"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}