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, maximum-scale=1.0, user-scalable=no"> <title>仁爱医疗 - 在线预约平台</title> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Poppins:wght@400;500;600;700&display=swap" rel="stylesheet"> <style> /* --- 全局样式与变量 --- */ :root { --primary-color: #007BFF; /* 专业蓝 */ --secondary-color: #28A745; /* 生命绿 */ --bg-color: #F8F9FA; --surface-color: #FFFFFF; --text-color: #212529; --text-secondary-color: #6c757d; --border-color: #E9ECEF; } * { margin: 0; padding: 0; box-sizing: border-box; } html, body { height: 100%; overflow: hidden; } body { font-family: 'Lato', 'Poppins', sans-serif; background-color: #E0E0E0; color: var(--text-color); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } #app-container { position: relative; max-width: 420px; height: 100%; margin: 0 auto; background-color: var(--bg-color); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 0 30px rgba(0,0,0,0.1); } /* --- 页面切换逻辑 --- */ .page { position: absolute; top: 0; left: 0; width: 100%; height: calc(100% - 70px); /* 减去底部导航栏高度 */ display: flex; flex-direction: column; opacity: 0; visibility: hidden; transition: opacity 0.2s ease-in-out; background-color: var(--bg-color); z-index: 10; } .page.active { opacity: 1; visibility: visible; z-index: 20; } /* 独立页面,不带底部导航 */ .page.full-page { height: 100%; } /* --- 通用组件 --- */ .header { flex-shrink: 0; display: flex; align-items: center; justify-content: center; padding: 15px 20px; background-color: var(--surface-color); border-bottom: 1px solid var(--border-color); position: relative; } .header-title { font-size: 1.15rem; font-weight: 600; } .back-btn { background: none; border: none; cursor: pointer; color: var(--text-color); position: absolute; left: 15px; padding: 5px; } .content { flex-grow: 1; overflow-y: auto; padding: 20px; } .btn { display: block; width: 100%; padding: 15px; border-radius: 12px; font-size: 1rem; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none; border: none; transition: all 0.2s ease; } .btn-primary { background-color: var(--primary-color); color: white; } .btn-primary:hover { background-color: #0056b3; } .btn-secondary { background-color: var(--secondary-color); color: white; } .btn-secondary:hover { background-color: #218838; } .card { background-color: var(--surface-color); border-radius: 12px; padding: 15px; margin-bottom: 15px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); transition: transform 0.2s ease; } .card:active { transform: scale(0.98); } .list-item { display: flex; align-items: center; padding: 15px; background-color: var(--surface-color); border-radius: 12px; margin-bottom: 10px; cursor: pointer; transition: box-shadow 0.2s ease; } .list-item:hover { box-shadow: 0 4px 12px rgba(0, 123, 255, 0.1); } /* --- 底部导航栏 --- */ .bottom-nav { position: absolute; bottom: 0; left: 0; right: 0; height: 60px; background-color: var(--surface-color); box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1); z-index: 100; display: flex; align-items: center; justify-content: space-around; } .nav-item { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; font-size: 12px; color: var(--text-secondary-color); cursor: pointer; padding: 8px 0; transition: all 0.3s ease; } .nav-item.active { color: var(--primary-color); font-weight: bold; } .nav-item:hover { background-color: #f0f0f0; } .nav-item .icon { width: 24px; height: 24px; margin-bottom: 4px; } .nav-item span { font-size: 0.75rem; font-weight: 600; } /* --- SVG图标 --- */ .icon { width: 24px; height: 24px; stroke-width: 2; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; } /* --- 页面 spécifiques --- */ /* 首页 (page-home) */ #page-home .header { justify-content: space-between; } #page-home .user-greeting h1 { font-size: 1.6rem; font-weight: 700; } #page-home .user-greeting p { color: var(--text-secondary-color); } #page-home .user-avatar { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; } .action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 25px; } .action-card { background-color: var(--surface-color); border-radius: 12px; padding: 20px; text-align: center; cursor: pointer; } .action-card .icon { width: 40px; height: 40px; margin-bottom: 10px; color: var(--primary-color); } .action-card h3 { font-size: 1rem; font-weight: 600; } .health-info-card { margin-top: 25px; display: flex; align-items: center; background: linear-gradient(135deg, #e6f2ff, #d4e7ff); } .health-info-card img { width: 80px; height: 80px; margin-right: 15px; } .health-info-card h4 { font-size: 1rem; margin-bottom: 5px; } .health-info-card p { font-size: 0.85rem; color: #0056b3; } /* 科室/医生列表页 */ .search-bar { display: flex; align-items: center; background: var(--surface-color); border-radius: 10px; padding: 10px 15px; margin-bottom: 20px; } .search-bar .icon { color: var(--text-secondary-color); margin-right: 10px; } .search-bar input { border: none; outline: none; width: 100%; font-size: 1rem; background: transparent; } .department-icon { width: 40px; height: 40px; border-radius: 8px; margin-right: 15px; display: flex; align-items: center; justify-content: center; background-color: #e6f2ff; } .department-icon .icon { color: var(--primary-color); } .list-item-info { flex: 1; } .list-item-info h4 { font-size: 1rem; font-weight: 600; } .list-item-info p { font-size: 0.85rem; color: var(--text-secondary-color); } .list-item .arrow-icon { color: var(--text-secondary-color); } .doctor-item img { width: 50px; height: 50px; border-radius: 50%; margin-right: 15px; object-fit: cover; } .doctor-item .rating { color: #ffc107; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0