跳转到内容
页面·免费

404 页面(HTML + CSS)

单个 HTML 文件的“页面未找到”页面。在静态网站里保存为 404.html。页面上有回到首页和报告失效链接的链接,有上一页时还会显示返回按钮。浅色或深色跟随系统设置。

免费安装。

如果你的 Android 设备上装了 PocketCode,这会在应用里打开此页面。

预览

404.html · 110 行
<!doctype html>
<!--
  "Page not found" page in one HTML file, no external files.
  Save it as 404.html at the root of your site (most static hosts serve it on a missing page).
  Change the two links at the bottom; colours live in the CSS variables, dark mode follows the system.
-->
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="robots" content="noindex">
  <title>Page not found</title>
  <style>
    :root {
      color-scheme: light dark;
      --bg: #f7f7fa;
      --fg: #1b1b1f;
      --muted: #55555f;
      --accent: #1f5fd1;
      --accent-fg: #ffffff;
      --line: #7c7c88;
    }
    @media (prefers-color-scheme: dark) {
      :root {
        --bg: #121216;
        --fg: #ececf1;
        --muted: #a8a8b3;
        --accent: #8ab4ff;
        --accent-fg: #0b1a33;
        --line: #7c7c88;
      }
    }
    *, *::before, *::after { box-sizing: border-box; }
    html, body { height: 100%; }
    body {
      margin: 0;
      display: grid;
      place-items: center;
      padding: 24px 16px;
      background: var(--bg);
      color: var(--fg);
      font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    }
    main { width: 100%; max-width: 480px; text-align: center; }
    .nf-code {
      margin: 0;
      font-size: clamp(4rem, 22vw, 7rem);
      font-weight: 800;
      line-height: 1;
      letter-spacing: -0.04em;
      color: var(--muted);
    }
    h1 { margin: 16px 0 8px; font-size: 1.75rem; line-height: 1.25; }
    p { margin: 0 0 32px; color: var(--muted); }
    .nf-actions {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 12px;
      margin: 0;
      padding: 0;
      list-style: none;
    }
    .nf-actions a, .nf-actions button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 48px;
      padding: 12px 20px;
      border-radius: 8px;
      font: inherit;
      font-weight: 600;
      text-decoration: none;
      cursor: pointer;
    }
    .nf-primary { border: 0; background: var(--accent); color: var(--accent-fg); }
    .nf-secondary { border: 1px solid var(--line); background: transparent; color: var(--fg); }
    .nf-actions a:focus-visible, .nf-actions button:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 3px;

此预览已截短。安装后可获得完整内容。

1.0.0 的变更

首个版本。

相关

联系表单(HTML + CSS)免费页面单个 HTML 文件里的联系表单:姓名、邮箱、可选的主题和留言。每个字段都有自己的标签,只有在用户输入过或尝试提交后才会显示红色边框。把表单的 action 改成你的接收地址。深色模式跟随系统。价格区块(HTML + Tailwind)免费页面用纯 HTML 加 Tailwind CSS 4 类名写的三档价格方案,不用 React 也不用 JavaScript。卡片在手机上纵向排列,并跟随系统设置切换深色。你的项目需要 Tailwind 来生成样式;方案和价格只是示例,请替换。落地页首屏(Next.js + Tailwind)免费页面用于 Next.js App Router 的首屏区块:柔和渐变背景上有标题、副标题和两个链接。系统处于深色模式时会使用深色配色。静态落地页Pro项目模板纯 HTML 和 CSS 编写的单页网站:带折叠菜单的页头、首屏、功能网格、常见问题和页脚。颜色跟随系统的浅色或深色模式。无需构建,也不需要 Linux:打开 index.html,点地球图标即可。登录界面(Compose)免费页面Material 3 的邮箱和密码登录界面。点按 Sign in 时检查两个输入框,显示服务器返回的错误,还可以加上“忘记密码”和指纹按钮。BiometricPrompt 需要你自己调用。设置页面(Compose)免费页面Material 3 设置页面,包含开关、主题选择和文字大小滑块。它本身不保存状态:你传入 SettingsState,就会拿回修改后的副本。每一行都是至少 56 dp 的单个触摸区域,TalkBack 会把它读作开关或单选按钮。