div+css布实现手机O2O旅游餐饮住宿App端ui原型图代码
代码语言:html
所属分类:布局界面
代码描述:div+css布实现手机O2O旅游餐饮住宿App端ui原型图代码
代码标签: div css 手机 O2O 旅游 餐饮 住宿 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>O2O旅游餐饮住宿App原型</title>
<style>
:root {
--primary-color: #007BFF;
--primary-light: #e6f2ff;
--secondary-color: #FF6B6B;
--text-dark: #333;
--text-light: #777;
--background-light: #f8f9fa;
--background-white: #ffffff;
--border-color: #dee2e6;
--success-color: #28a745;
--warning-color: #ffc107;
--orange-color: #fd7e14;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
html, body {
width: 100%;
height: 100%;
overflow: hidden;
background-color: #e9ecef;
}
#viewport {
width: 100%;
height: 100%;
cursor: grab;
overflow: hidden;
position: relative;
}
#viewport:active {
cursor: grabbing;
}
#canvas {
transform-origin: 0 0;
transition: transform 0.1s ease-out;
padding: 50px;
}
.prototype-grid {
display: flex;
flex-wrap: wrap;
gap: 40px;
width: max-content;
}
.prototype-module {
display: flex;
flex-direction: column;
gap: 20px;
}
.module-title {
font-size: 24px;
font-weight: bold;
color: var(--text-dark);
border-left: 5px solid var(--primary-color);
padding-left: 15px;
margin-bottom: 10px;
}
.module-row {
display: flex;
flex-wrap: nowrap;
gap: 40px;
}
.prototype-container {
flex-shrink: 0;
background-color: var(--background-white);
padding: 10px;
border-radius: 20px;
box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}
.prototype-container > h2 {
font-size: 14px;
text-align: center;
color: var(--text-light);
margin-bottom: 10px;
font-weight: 500;
}
.phone-screen {
width: 375px;
height: 812px;
background-color: var(--background-light);
border: 10px solid #111;
border-radius: 40px;
box-shadow: 0 0 20px rgba(0,0,0,0.2) inset;
position: relative;
overflow: hidden;
display: flex;
flex-direction: column;
color: var(--text-dark);
}
.phone-screen-inner {
flex: 1;
overflow-y: auto;
overflow-x: hidden;
background-color: var(--background-light);
}
.phone-screen-inner::-webkit-scrollbar {
width: 0;
background: transparent;
}
/* Common UI Components */
.page-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 15px;
background-color: var(--background-white);
border-bottom: 1px solid var(--border-color);
position: sticky;
top: 0;
z-index: 10;
}
.page-header.no-border {
border-bottom: none;
}
.page-header-title {
font-size: 18px;
font-weight: 600;
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.icon {
width: 24px;
height: 24px;
stroke-width: 2;
stroke: currentColor;
fill: none;
stroke-linecap: round;
stroke-linejoin: round;
}
.icon-sm { width: 20px; height: 20px; }
.icon-lg { width: 32px; height: 32px; }
.bottom-nav {
display: flex;
justify-content: space-around;
align-items: center;
height: 60px;
background-color: var(--background-white);
border-top: 1px solid var(--border-color);
box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
padding-bottom: 15px; /* for notch */
position: absolute;
bottom: 0;
width: 100%;
}
.nav-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
font-size: 10px;
color: var(--text-light);
cursor: pointer;
}
.nav-item.active {
color: var(--primary-color);
}
.search-bar {
flex: 1;
display: flex;
align-items: center;
background-color: var(--background-light);
border-radius: 20px;
padding: 8px 15px;
gap: 8px;
color: var(--text-light);
}
.search-bar input {
border: none;
outline: none;
background: transparent;
width: 100%;
font-size: 14px;
}
.content-padding {
padding: 15px;
}
.section-title {
font-size: 18px;
font-weight: 600;
margin-bottom: 15px;
display: flex;
justify-content: space-between;
align-items: center;
}
.section-title .more {
font-size: 12px;
color: var(--text-light);
font-weight: 400;
}
.card {
background-color: var(--background-white);
border-radius: 12px;
overflow: hidden;
box-shadow: 0 4px 12px rgba(0,0,0,0.05);
margin-bottom: 15px;
}
.card-img {
width: 100%;
height: 180px;
object-fit: cover;
}
.card-body {
padding: 12px;
}
.card-title {
font-size: 16px;
font-weight: 600;
margin-bottom: 8px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.card-text {
font-size: 12px;
color: var(--text-light);
display: flex;
align-items: center;
gap: 5px;
}
.card-footer {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 10px;
}
.price {
font-size: 18px;
font-weight: bold;
color: var(--secondary-color);
}
.price .unit {
font-size: 12px;
font-weight: normal;
}
.btn {
border: none;
padding: 8px 16px;
border-radius: 20px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
}
.btn-primary {
background-color: var(--primary-color);
color: white;
}
.btn-secondary {
background-color: var(--primary-light);
color: var(--primary-color);
}
.btn-full {
width: 100%;
padding: 12px;
font-size: 16px;
}
.tag {
font-size: 10px;
padding: 3px 8px;
bord.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0