首页/ mobileweb/ 小草快批下单 H5 移动端功能演示/ 代码预览

💻 代码预览 · 小草快批下单 H5 移动端功能演示

mw_service · 上传者 驰旭教育
← 返回详情
r105/style.css · 约 9865 字符
1/* 小草快批下单 · 共享样式(移动端 H5,原生) */2* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }3:root{4  --green:#07a35a; --green-d:#058a4b; --green-l:#e8f7ef;5  --bg:#f4f6f5; --card:#fff; --text:#1f2d27; --muted:#8a9a92; --line:#eef1ef;6  --orange:#ff7a18; --red:#e23b3b;7}8html,body{ background:var(--bg); color:var(--text); font-size:14px;9  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif; }10a{ color:inherit; text-decoration:none; }11img{ display:block; }12.app{ min-height:100vh; padding-bottom:64px; }1314/* 顶栏 */15.topbar{ position:sticky; top:0; z-index:20; background:linear-gradient(135deg,var(--green),var(--green-d));16  color:#fff; padding:10px 14px 12px; }17.topbar .brand{ display:flex; align-items:center; gap:6px; font-size:17px; font-weight:700; }18.topbar .brand .logo{ width:24px; height:24px; border-radius:7px; background:#fff; color:var(--green);19  display:flex; align-items:center; justify-content:center; font-size:15px; }20.topbar .search{ margin-top:9px; background:rgba(255,255,255,.22); border-radius:18px; padding:7px 12px;21  font-size:12.5px; color:#eafff4; display:flex; align-items:center; gap:6px; }22.topbar .search input{ border:0; background:transparent; outline:none; color:#fff; flex:1; font-size:13px; }23.topbar .search input::placeholder{ color:#d6f5e8; }2425/* 通用返回条 */26.navbar{ position:sticky; top:0; z-index:20; background:#fff; border-bottom:1px solid var(--line);27  height:48px; display:flex; align-items:center; padding:0 12px; font-weight:600; }28.navbar .back{ font-size:20px; margin-right:8px; }29.navbar .ttl{ font-size:16px; }3031/* 选购页:左分类 + 右商品 */32.shop{ display:flex; align-items:flex-start; }33.catbar{ width:88px; flex:0 0 88px; background:#fff; border-right:1px solid var(--line);34  position:sticky; top:0; height:calc(100vh - 0px); overflow:auto; }35.catbar .ci{ padding:16px 6px; text-align:center; font-size:13px; color:var(--muted);36  border-left:3px solid transparent; }37.catbar .ci.on{ color:var(--green-d); font-weight:700; background:var(--green-l); border-left-color:var(--green); }38.plist{ flex:1; padding:10px 10px 12px; }39.pcard{ background:var(--card); border-radius:12px; padding:10px; margin-bottom:10px; display:flex; gap:10px; }40.pcard .pic{ width:62px; height:62px; flex:0 0 62px; border-radius:10px; display:flex; align-items:center;41  justify-content:center; font-size:30px; color:#fff; }42.pcard .info{ flex:1; min-width:0; }43.pcard .nm{ font-size:14.5px; font-weight:600; }44.pcard .ds{ font-size:12px; color:var(--muted); margin:3px 0 6px; line-height:1.35; }45.pcard .pr{ display:flex; gap:10px; align-items:baseline; }46.pcard .pr b{ color:var(--red); font-size:14px; }47.pcard .pr .u{ font-size:11px; color:var(--muted); }48.pcard .acts{ display:flex; gap:6px; margin-top:8px; }49.btn{ border:0; border-radius:18px; padding:6px 12px; font-size:12.5px; cursor:pointer; font-weight:600; }50.btn-green{ background:var(--green); color:#fff; }51.btn-ghost{ background:var(--green-l); color:var(--green-d); }52.btn-detail{ background:#fff; color:var(--green-d); border:1px solid var(--green); }53.btn-block{ display:block; width:100%; text-align:center; }54.btn-orange{ background:var(--orange); color:#fff; }55.btn-lg{ padding:12px; font-size:15px; border-radius:24px; }5657/* 底部购物车汇总条 */58.cartbar{ position:fixed; left:0; right:0; bottom:0; height:56px; background:#fff;59  border-top:1px solid var(--line); display:flex; align-items:center; padding:0 12px; z-index:30; }60.cartbar .ic{ position:relative; font-size:24px; margin-right:10px; }61.cartbar .ic .badge{ position:absolute; top:-6px; right:-8px; background:var(--red); color:#fff;62  font-size:10px; min-width:16px; height:16px; line-height:16px; border-radius:9px; text-align:center; padding:0 4px; }63.cartbar .total{ flex:1; font-size:15px; font-weight:700; }64.cartbar .total small{ font-size:11px; color:var(--muted); font-weight:400; }6566/* 底部 Tab */67.tabbar{ position:fixed; left:0; right:0; bottom:0; height:56px; background:#fff; border-top:1px solid var(--line);68  display:flex; z-index:30; }69.tab{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;70  font-size:11px; color:var(--muted); position:relative; }71.tab .ti{ font-size:20px; position:relative; }72.tab.on{ color:var(--green-d); font-weight:700; }73.tab .badge{ position:absolute; top:-4px; right:-10px; background:var(--red); color:#fff; font-size:10px;74  min-width:15px; height:15px; line-height:15px; border-radius:9px; text-align:center; padding:0 3px; }7576/* 详情页 */77.hero{ display:flex; gap:12px; padding:16px 14px; background:#fff; }78.hero .pic{ width:84px; height:84px; border-radius:14px; display:flex; align-items:center; justify-content:center;79  font-size:42px; color:#fff; flex:0 0 84px; }80.hero .nm{ font-size:18px; font-weight:700; }81.hero .ds{ font-size:13px; color:var(--muted); margin-top:6px; line-height:1.5; }82.sect{ background:#fff; margin-top:10px; padding:14px; }83.sect .lab{ font-size:13px; color:var(--muted); margin-bottom:10px; }84.spec{ display:flex; gap:10px; }85.spec .opt{ flex:1; border:1.5px solid var(--line); border-radius:12px; padding:12px; text-align:center; cursor:pointer; }86.spec .opt.on{ border-color:var(--green); background:var(--green-l); }87.spec .opt .t{ font-weight:700; font-size:14px; }88.spec .opt .p{ color:var(--red); font-weight:700; margin-top:4px; }89.spec .opt .u{ font-size:11px; color:var(--muted); margin-top:2px; }90.stepper{ display:flex; align-items:center; gap:14px; margin-top:6px; }91.stepper button{ width:30px; height:30px; border-radius:50%; border:1px solid var(--line); background:#fff; font-size:18px; cursor:pointer; }92.stepper .n{ font-size:16px; font-weight:700; min-width:24px; text-align:center; }93.detail-acts{ position:fixed; left:0; right:0; bottom:0; display:flex; gap:10px; padding:10px 12px; background:#fff; border-top:1px solid var(--line); z-index:30; }94.detail-acts .btn{ flex:1; }9596/* 列表通用 */97.list{ background:#fff; margin-top:10px; border-radius:12px; overflow:hidden; }98.row{ display:flex; align-items:center; padding:13px 14px; border-bottom:1px solid var(--line); }99.row:last-child{ border-bottom:0; }100.row .l{ flex:1; min-width:0; }101.row .l .t{ font-size:14.5px; font-weight:600; }102.row .l .s{ font-size:12px; color:var(--muted); margin-top:3px; }103.row .r{ color:var(--muted); font-size:13px; }104.row .price{ color:var(--red); font-weight:700; }105106/* 购物车条目 */107.citem{ display:flex; gap:10px; padding:12px 14px; background:#fff; border-bottom:1px solid var(--line); }108.citem .pic{ width:52px; height:52px; border-radius:10px; display:flex; align-items:center; justify-content:center;109  font-size:26px; color:#fff; flex:0 0 52px; }110.citem .info{ flex:1; min-width:0; }111.citem .nm{ font-size:14px; font-weight:600; }112.citem .sp{ font-size:12px; color:var(--muted); margin-top:3px; }113.citem .pr{ color:var(--red); font-weight:700; margin-top:4px; }114.citem .rt{ display:flex; align-items:center; gap:8px; }115.citem .del{ color:var(--muted); font-size:12px; }116.mini-step{ display:flex; align-items:center; gap:8px; }117.mini-step button{ width:24px; height:24px; border-radius:50%; border:1px solid var(--line); background:#fff; cursor:pointer; }118.mini-step .n{ min-width:20px; text-align:center; font-weight:700; }119120/* 我的 */121.ucard{ background:linear-gradient(135deg,var(--green),var(--green-d)); color:#fff; padding:22px 16px; }122.ucard .av{ width:54px; height:54px; border-radius:50%; background:rgba(255,255,255,.25); display:flex;123  align-items:center; justify-content:center; font-size:28px; }124.ucard .un{ font-size:17px; font-weight:700; margin-top:10px; }125.ucard .ut{ font-size:12px; opacity:.85; margin-top:3px; }126.menu{ background:#fff; margin-top:12px; border-radius:12px; overflow:hidden; }127.menu .mi{ display:flex; align-items:center; padding:14px; border-bottom:1px solid var(--line); }128.menu .mi:last-child{ border-bottom:0; }129.menu .mi .ico{ font-size:19px; width:26px; text-align:center; }130.menu .mi .tx{ flex:1; font-size:14.5px; }131.menu .mi .ar{ color:var(--muted); }132.rec{ display:grid; grid-template-columns:repeat(2,1fr); gap:10px; padding:12px; }133.rec .rc{ background:#fff; border-radius:12px; padding:10px; display:flex; gap:8px; }134.rec .rc .pic{ width:44px; height:44px; border-radius:9px; display:flex; align-items:center; justify-content:center; font-size:22px; color:#fff; flex:0 0 44px; }135.rec .rc .nm{ font-size:13px; font-weight:600; }136.rec .rc .pr{ font-size:12px; color:var(--red); font-weight:700; margin-top:3px; }137138/* 密码弹窗 / 模态 */139.mask{ position:fixed; inset:0; background:rgba(0,0,0,.45); display:flex; align-items:center; justify-content:center; z-index:50; }140.modal{ background:#fff; border-radius:14px; width:84%; max-width:320px; padding:20px; }141.modal h3{ font-size:16px; margin-bottom:12px; text-align:center; }142.modal input{ width:100%; border:1px solid var(--line); border-radius:10px; padding:11px; font-size:14px; outline:none; margin-bottom:12px; }143.modal .macts{ display:flex; gap:10px; }144.kv{ font-size:13px; margin-bottom:8px; }145.kv label{ display:block; color:var(--muted); margin-bottom:4px; }146.kv input{ width:100%; border:1px solid var(--line); border-radius:9px; padding:9px; font-size:14px; outline:none; }147148/* 管理表 */149.mg-table{ width:100%; border-collapse:collapse; background:#fff; font-size:12.5px; }150.mg-table th,.mg-table td{ border:1px solid var(--line); padding:8px 6px; text-align:left; }151.mg-table th{ background:var(--green-l); color:var(--green-d); }152.mg-table .upd{ width:56px; border:1px solid var(--line); border-radius:6px; padding:4px; font-size:12px; }153.empty{ text-align:center; color:var(--muted); padding:40px 0; font-size:13px; }154.sub{ font-size:12px; color:var(--muted); margin:4px 0 10px; }155