| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta charset="UTF-8"/>
- <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
- <title>LED 滚动文字</title>
- <style>
- /* LED 滚动窗口:透明背景,整行可拖动 */
- * { box-sizing: border-box; }
- html, body {
- margin: 0;
- height: 100%;
- overflow: hidden;
- background: transparent !important; /* 强制透明:窗口无底色 */
- -webkit-user-select: none;
- user-select: none;
- }
- .led-wrap {
- position: relative;
- width: 100vw;
- height: 100vh;
- display: flex;
- align-items: center;
- background: transparent !important;
- --wails-draggable: drag; /* 整行可拖动窗口 */
- cursor: move;
- }
- /* 点阵画布:透明底,点阵由 requestAnimationFrame 驱动 */
- #led-canvas {
- display: block;
- background: transparent;
- width: 100%;
- height: 100%;
- }
- /* 关闭按钮:不触发拖动 */
- .led-close {
- position: absolute;
- top: 6px;
- right: 6px;
- width: 24px;
- height: 24px;
- border: 1px solid rgba(255, 255, 255, 0.22);
- border-radius: 6px;
- background: rgba(0, 0, 0, 0.45);
- color: #fff;
- font-size: 15px;
- line-height: 1;
- cursor: pointer;
- --wails-draggable: no-drag;
- z-index: 10;
- }
- .led-close:hover { background: rgba(255, 77, 77, 0.6); }
- </style>
- </head>
- <body>
- <div class="led-wrap" id="led-wrap">
- <canvas id="led-canvas"></canvas>
- <button class="led-close" id="led-close" title="关闭">×</button>
- </div>
- <script type="module" src="/src/led.js"></script>
- </body>
- </html>
|