div+css布局实现废品回收app的ui原型图代码
代码语言:html
所属分类:布局界面
代码描述:div+css布局实现废品回收app的ui原型图代码
代码标签: div css 布局 废品 回收 app ui 原型图 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>上门废品回收 App UI 原型集合</title>
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/all.6.4.0.css">
<style>
:root {
--primary-color: #10B981; /* 环保绿 */
--primary-dark: #059669;
--bg-color: #F3F4F6;
--text-main: #1F2937;
--text-sub: #6B7280;
--white: #FFFFFF;
--border-color: #E5E7EB;
--screen-width: 375px;
--screen-height: 812px; /* iPhone X/11/12/13 Mini size */
--radius: 12px;
}
* {
box-sizing: border-box;
user-select: none; /* 防止拖拽时选中文本 */
}
body, html {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: hidden;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
background-color: #e5e5e5;
}
/* 画布视口 */
#viewport {
width: 100%;
height: 100%;
background-image: radial-path(circle, #c1c1c1 1px, transparent 1px);
background-size: 20px 20px;
background-color: #f0f0f0;
overflow: hidden;
cursor: grab;
position: relative;
}
#viewport:active {
cursor: grabbing;
}
/* 画布容器 */
#canvas {
position: absolute;
top: 50%;
left: 50%;
transform-origin: center center;
transform: translate(-50%, -50%) scale(1);
display: flex;
gap: 60px;
padding: 100px;
width: auto;
justify-content: center;
align-items: flex-start;
transition: transform 0.1s ease-out; /* 平滑一点 */
}
/* 单个页面容器 */
.prototype-container {
display: flex;
flex-direction: column;
align-items: center;
gap: 15px;
}
.screen-title {
font-size: 16px;
font-weight: 600;
color: #374151;
background: rgba(255,255,255,0.8);
padding: 6px 16px;
border-radius: 20px;
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
/* 手机外壳模拟 */
.mobile-screen {
width: var(--screen-width);
height: var(--screen-height);
background-color: var(--bg-color);
border-radius: 40px;
border: 8px solid #333;
box-shadow: 0 20px 50px rgba(0,0,0,0.2);
position: relative;
overflow: hidden;
display: flex;
flex-direction: column;
}
/* 顶部状态栏模拟 */
.status-bar {
height: 44px;
width: 100%;
background: var(--white);
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 20px;
font-size: 12px;
font-weight: 600;
color: #000;
z-index: 100;
position: absolute;
top: 0;
}
.notch {
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
width: 150px;
height: 30px;
background: #333;
border-bottom-left-radius: 16px;
border-bottom-right-radius: 16px;
z-index: 101;
}
/* 通用 UI 组件 */
.app-content {
flex: 1;
padding: 50px 20px 80px 20px; /* Top space for status bar, bottom for nav */
overflow-y: auto;
}
.app-content::-webkit-scrollbar {
display: none;
}
.btn {
width: 100%;
padding: 14px;
border-radius: var(--radius);
border: none;
font-size: 16px;
font-weight: 600;
cursor: pointer;
text-align: center;
transition: opacity 0.2s;
}
.btn-primary {
background-color: var(--primary-color);
color: white;
box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}
.btn-outline {
background-color: transparent;
border: 1px solid var(--border-color);
color: var(--text-main);
}
.card {
background: var(--white);
border-radius: var(--radius);
padding: 16px;
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
margin-bottom: 16px;
}
.input-group {
margin-bottom: 16px;
}
.input-group label {
display: block;
font-size: 13px;
color: var(--text-sub);
margin-bottom: 8px;
}
.input-field {
width: 100%;
padding: 12px 16px;
background: #F9FAFB;
border: 1px solid var(--border-color);
border-radius: var(--radius);
font-size: 14px;
outline: none;
}
.input-field:focus {
border-color: var(--primary-color);
background: white;
}
/* 底部导航 */
.bottom-nav {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 80px;
background: white;
border-top: 1px solid #eee;
display: flex;
justify-content: space-around;
align-items: flex-start;
padding-top: 12px;
z-index: 90;
padding-bottom: 20px; /* 适配 Home Indicator */
}
.nav-item {
display: flex;
flex-direction: column;
align-items: center;
color: #9CA3AF;
font-size: 10px;
gap: 4px;
}
.nav-item.active {
color: var(--primary-color);
}
.nav-item i {
font-size: 20px;
}
/* --- 特定页面样式 --- */
/* 登录页 */
.login-header {
margin-top: 60px;
margin-bottom: 40px;
}
.login-title { font-size: 28px; font-weight: 800; color: var(--text-main); margin-bottom: 8px; }
.login-sub { font-size: 14px; color: var(--text-sub); }
/* 首页 */
.home-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.location-tag { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.banner {
width: 100%;
height: 140px;
background: linear-gradient(135deg, #10B981, #34D399);
border-radius: var(--radius);
display: flex;
align-items: center;
padding: 20px;
color: white;
margin-bottom: 24px;
position: relative;
overflow: hidden;
}
.banner-text h3 { margin: 0 0 5px 0; font-size: 20px; }
.banner-text p { margin: 0; font-size: 12px; opacity: 0.9; }
.ba.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0