首页/ mobileweb/ 每日作业 H5/ 代码预览

💻 代码预览 · 每日作业 H5

mw_edu · 上传者 驰旭教育
← 返回详情
style.css · 约 5394 字符
1
2*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
3html,body{margin:0;padding:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;background:#eef2ff;color:#1e293b}
4a{color:inherit;text-decoration:none}
5.app{max-width:430px;margin:0 auto;min-height:100vh;background:#f5f8ff;position:relative;overflow:hidden}
6.topbar{height:54px;background:linear-gradient(135deg,#2563eb,#06b6d4);color:#fff;display:flex;align-items:center;justify-content:center;position:sticky;top:0;z-index:10;font-weight:700;font-size:17px;box-shadow:0 2px 10px rgba(37,99,235,.25)}
7.view{display:none;padding:16px;padding-bottom:84px;animation:fade .25s ease}
8.view.active{display:block}
9@keyframes fade{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
10.hero{border-radius:18px;padding:20px;color:#fff;background:linear-gradient(135deg,#2563eb,#06b6d4);box-shadow:0 8px 22px rgba(37,99,235,.22)}
11.hero h1{margin:0 0 4px;font-size:21px}
12.hero p{margin:0;opacity:.92;font-size:13px}
13.hero .stat{display:flex;gap:14px;margin-top:14px}
14.hero .stat div{flex:1;background:rgba(255,255,255,.18);border-radius:12px;padding:10px;text-align:center}
15.hero .stat div b{display:block;font-size:19px}
16.hero .stat div small{opacity:.9;font-size:11px}
17.section-title{font-size:16px;font-weight:800;margin:20px 4px 12px;display:flex;align-items:center;justify-content:space-between}
18.section-title small{font-weight:500;color:#0891b2;font-size:12px}
19.hw{border-radius:16px;background:#fff;margin-bottom:12px;box-shadow:0 4px 16px rgba(37,99,235,.07);border:1px solid #e0e7ff;overflow:hidden}
20.hw .head{display:flex;align-items:center;gap:10px;padding:13px 14px;border-bottom:1px solid #f1f5f9}
21.hw .sub{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;color:#fff;font-weight:800;font-size:14px}
22.hw .head .name{font-weight:700;font-size:15px}
23.hw .head .time{margin-left:auto;color:#94a3b8;font-size:12px}
24.hw .body{padding:12px 14px}
25.hw .body .content{font-size:14px;line-height:1.6;color:#334155;margin-bottom:12px}
26.hw .foot{display:flex;align-items:center;gap:10px}
27.tag{font-size:11px;padding:3px 10px;border-radius:999px;font-weight:600}
28.tag-blue{background:#dbeafe;color:#1d4ed8}
29.tag-green{background:#dcfce7;color:#15803d}
30.tag-amber{background:#fef3c7;color:#b45309}
31.tag-gray{background:#f1f5f9;color:#64748b}
32.btn{display:block;text-align:center;padding:13px;border-radius:12px;font-weight:700;font-size:15px;border:none;width:100%}
33.btn-primary{background:linear-gradient(135deg,#2563eb,#06b6d4);color:#fff;box-shadow:0 4px 14px rgba(37,99,235,.28)}
34.btn-ghost{background:#fff;border:1px solid #bfdbfe;color:#2563eb}
35.btn-sm{padding:8px 14px;font-size:13px;width:auto}
36.field{margin-bottom:14px}
37.field label{display:block;font-size:13px;font-weight:700;color:#1e40af;margin-bottom:7px}
38.field input,.field select,.field textarea{width:100%;padding:12px 14px;border:1px solid #bfdbfe;border-radius:11px;font-size:14px;outline:none;background:#fff;font-family:inherit}
39.field textarea{min-height:88px;resize:vertical}
40.field input:focus,.field select:focus,.field textarea:focus{border-color:#2563eb}
41.chips{display:flex;flex-wrap:wrap;gap:8px}
42.chip{padding:10px 16px;border-radius:11px;border:1px solid #bfdbfe;background:#fff;font-size:14px;color:#1e40af}
43.chip.on{background:linear-gradient(135deg,#2563eb,#06b6d4);color:#fff;border-color:transparent;font-weight:700}
44.stars{display:flex;gap:6px;font-size:26px}
45.stars span{color:#cbd5e1;cursor:pointer}
46.stars span.on{color:#f59e0b}
47.card{background:#fff;border-radius:16px;padding:16px;box-shadow:0 4px 16px rgba(37,99,235,.07);border:1px solid #e0e7ff;margin-bottom:12px}
48.card .hd{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
49.card .hd strong{font-size:15px}
50.comment{background:#f8fafc;border-radius:12px;padding:12px;font-size:13px;line-height:1.6;color:#475569;border:1px dashed #cbd5e1}
51.comment .who{font-weight:700;color:#2563eb;margin-bottom:4px;font-size:12px}
52.progress-ring{width:96px;height:96px}
53.progress-ring circle{fill:none;stroke-width:10}
54.progress-ring .track{stroke:#e2e8f0}
55.progress-ring .fill{stroke:url(#pg);stroke-linecap:round;transform:rotate(-90deg);transform-origin:50% 50%}
56.bar-row{display:flex;align-items:center;gap:10px;margin-bottom:12px}
57.bar-row .lab{width:54px;font-size:13px;font-weight:600;color:#334155}
58.bar-row .track{fl:1;flex:1;height:12px;background:#e2e8f0;border-radius:999px;overflow:hidden}
59.bar-row .track .fill{height:100%;background:linear-gradient(90deg,#2563eb,#06b6d4);border-radius:999px}
60.bar-row .num{width:38px;text-align:right;font-size:12px;color:#64748b}
61.tabbar{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:430px;height:64px;background:#fff;border-top:1px solid #e0e7ff;display:flex;z-index:20}
62.tabbar a{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#64748b;font-size:11px}
63.tabbar a .ic{font-size:20px}
64.tabbar a.on{color:#2563eb;font-weight:700}
65.empty{text-align:center;color:#64748b;padding:40px 0;font-size:14px}
66.toast{position:fixed;left:50%;top:40%;transform:translate(-50%,-50%);background:rgba(0,0,0,.82);color:#fff;padding:12px 20px;border-radius:10px;font-size:14px;z-index:99;display:none}
67