Spaces:
Sleeping
Sleeping
| <html lang="zh-CN"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>中文 Flutter 项目 - 预览 (请先使用 Flutter Build 构建)</title> | |
| <style> | |
| body { | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| height: 100vh; | |
| margin: 0; | |
| font-family: sans-serif; | |
| background-color: #f0f2f5; | |
| } | |
| .container { | |
| text-align: center; | |
| padding: 40px; | |
| background: white; | |
| border-radius: 12px; | |
| box-shadow: 0 4px 12px rgba(0,0,0,0.1); | |
| } | |
| h1 { color: #6200ee; } | |
| p { color: #666; } | |
| .btn { | |
| background: #6200ee; | |
| color: white; | |
| border: none; | |
| padding: 10px 20px; | |
| border-radius: 20px; | |
| cursor: pointer; | |
| font-size: 16px; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <h1>中文 Flutter 项目首页</h1> | |
| <p>这是一个 Flutter 项目的 Web 预览占位符。</p> | |
| <p>如果你看到这个页面,说明你还没有使用 <code>flutter build web</code> 进行构建。</p> | |
| <div id="counter-section"> | |
| <p>你点击按钮的次数如下:</p> | |
| <h2 id="counter">0</h2> | |
| <button class="btn" onclick="increment()">增加计数</button> | |
| </div> | |
| </div> | |
| <script> | |
| let count = 0; | |
| function increment() { | |
| count++; | |
| document.getElementById('counter').innerText = count; | |
| } | |
| </script> | |
| </body> | |
| </html> | |