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>美食汇 - 智能点餐</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: #f8f9fa;
overflow-x: hidden;
}
.container {
max-width: 414px;
margin: 0 auto;
background: white;
min-height: 100vh;
position: relative;
box-shadow: 0 0 20px rgba(0,0,0,0.1);
}
.page {
display: none;
min-height: 100vh;
background: white;
}
.page.active {
display: block;
}
.header {
background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
color: white;
padding: 20px;
text-align: center;
position: relative;
}
.header h1 {
font-size: 24px;
margin-bottom: 5px;
}
.header p {
opacity: 0.9;
font-size: 14px;
}
.back-btn {
position: absolute;
left: 20px;
top: 50%;
transform: translateY(-50%);
background: none;
border: none;
color: white;
font-size: 18px;
cursor: pointer;
}
.nav-bar {
display: flex;
background: white;
border-top: 1px solid #eee;
position: fixed;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 100%;
max-width: 414px;
z-index: 100;
}
.nav-item {
flex: 1;
padding: 12px;
text-align: center;
cursor: pointer;
border: none;
background: none;
color: #666;
font-size: 12px;
}
.nav-item.active {
color: #ff6b6b;
}
.nav-item svg {
width: 24px;
height: 24px;
margin-bottom: 4px;
}
.content {
padding: 20px;
padding-bottom: 80px;
}
.welcome-section {
text-align: center;
padding: 40px 20px;
}
.welcome-section h2 {
font-size: 28px;
color: #333;
margin-bottom: 10px;
}
.welcome-section p {
color: #666;
margin-bottom: 30px;
}
.table-input {
display: flex;
gap: 10px;
margin-bottom: 20px;
align-items: center;
justify-content: center;
}
.table-input input {
padding: 12px;
border: 2px solid #ddd;
border-radius: 8px;
font-size: 16px;
width: 120px;
text-align: center;
}
.btn {
background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
color: white;
border: none;
padding: 12px 24px;
border-radius: 8px;
font-size: 16px;
cursor: pointer;
transition: transform 0.2s;
}
.btn:hover {
transform: translateY(-2px);
}
.btn-secondary {
background: #f8f9fa;
color: #333;
border: 1px solid #ddd;
}
.category-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 15px;
margin-bottom: 30px;
}
.category-card {
background: white;
border-radius: 12px;
padding: 20px;
text-align: center;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
cursor: pointer;
transition: transform 0.2s;
}
.category-card:hover {
transform: translateY(-5px);
}
.category-card img {
width: 60px;
height: 60px;
border-radius: 50%;
object-fit: cover;
margin-bottom: 10px;
}
.menu-item {
background: white;
border-radius: 12px;
padding: 15px;
margin-bottom: 15px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
display: flex;
gap: 15px;
}
.menu-item img {
width: 80px;
height: 80px;
border-radius: 8px;
object-fit: cover;
}
.menu-item-info {
flex: 1;
}
.menu-item-name {
font-size: 16px;
font-weight: bold;
margin-bottom: 5px;
}
.menu-item-desc {
color: #666;
font-size: 12px;
margin-bottom: 10px;
}
.menu-item-price {
color: #ff6b6b;
font-size: 18px;
font-weight: bold;
}
.quantity-control {
display: flex;
align-items: center;
gap: 10px;
margin-top: 10px;
}
.quantity-btn {
width: 30px;
height: 30px;
border: 1px solid #ddd;
background: white;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
}
.cart-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px 0;
border-bottom: 1px solid #eee;
}
.cart-summary {
background: #f8f9fa;
padding: 20px;
border-radius: 12px;
margin-top: 20px;
}
.summary-row {
display: flex;
justify-content: space-between;
margin-bottom: 10px;
}
.dining-options {
display: flex;
.........完整代码请登录后点击上方下载按钮下载查看
网友评论0