vue3实现一个移动端美团外卖类app微网站ui原型图h5代码
代码语言:html
所属分类:其他
代码描述:vue3实现一个移动端美团外卖类app微网站ui原型图h5代码
代码标签: vue 移动端 美团 外卖 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>Vue3 美团外卖App</title>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/vue3.2.22.js"></script>
<style>
:root {
--primary-color: #ffd100;
--bg-color: #f5f5f5;
--text-color: #333;
--text-secondary-color: #666;
--text-light-color: #999;
--border-color: #eee;
--white: #fff;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
margin: 0;
background-color: var(--bg-color);
color: var(--text-color);
font-size: 14px;
}
#app {
max-width: 480px;
margin: 0 auto;
background-color: var(--white);
min-height: 100vh;
position: relative;
padding-bottom: 60px; /* For bottom nav */
}
.page-container { padding: 10px; }
.icon { width: 1em; height: 1em; vertical-align: -0.15em; fill: currentColor; overflow: hidden; }
.btn { padding: 8px 12px; border: none; border-radius: 20px; font-size: 14px; cursor: pointer; }
.btn-primary { background-color: var(--primary-color); color: var(--text-color); font-weight: bold; }
.btn-primary[disabled] { background-color: #ccc; cursor: not-allowed; }
/* Bottom Nav */
.bottom-nav {
position: fixed; bottom: 0; left: 0; right: 0; max-width: 480px; margin: 0 auto;
height: 55px; background-color: var(--white); border-top: 1px solid var(--border-color);
display: flex; justify-content: space-around; align-items: center; z-index: 90;
}
.nav-item {
cursor: pointer; text-align: center; color: var(--text-secondary-color);
display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.nav-item .icon { font-size: 22px; }
.nav-item.active { color: var(--text-color); }
.nav-item span { font-size: 10px; }
/* Home Page */
.home-header { padding: 10px; background: var(--primary-color); }
.search-bar { background: var(--white); border-radius: 20px; padding: 8px 15px; text-align: center; color: var(--text-light-color); }
.category-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 15px 10px; text-align: center; }
.category-item img { width: 45px; height: 45px; border-radius: 50%; }
.category-item span { font-size: 12px; margin-top: 5px; display: block; }
.section-title { font-size: 16px; font-weight: bold; padding: 0 10px 10px; }
.restaurant-list { display: flex; flex-direction: column; gap: 15px; }
.restaurant-card { display: flex; gap: 10px; cursor: pointer; }
.restaurant-card img { width: 80px; height: 80px; border-radius: 5px; object-fit: cover; }
.restaurant-info { flex: 1; display: flex; flex-direction: column; justify-content: space-between; border-bottom: 1px solid var(--border-color); padding-bottom: 15px; }
.res-name { font-size: 16px; font-weight: bold; }
.res-stats { font-size: 12px; color: var(--text-secondary-color); }
.res-delivery { font-size: 12px; color: var(--text-light-color); }
/* Restaurant Page */
.res-page-header { padding: 15px; display: flex; gap: 15px; background: #444; color: white; }
.res-page-header img { width: 90px; height: 90px; border-radius: 5px; }
.res-page-info .name { font-size: 20px; font-weight: bold; }
.res-page-info .info { font-size: 12px; opacity: 0.8; margin-top: 5px; }
.back-btn { position: absolute; top: 15px; left: 15px; color: white; background: rgba(0,0,0,0.3); border: none; border-radius: 50%; width: 30px; height: 30px; z-index: 10; cursor: pointer; }
.menu-container { display: flex; height: calc(100vh - 190px); }
.menu-nav { width: 80px; background: var(--bg-color); overflow-y: auto; }
.menu-nav-item { padding: 15px 10px; font-size: 13px; text-align: center; cursor: pointer; }
.menu-nav-item.active { background: var(--white); font-weight: bold; }
.menu-content { flex: 1; padding: 10px; overflow-y: auto; }
.food-category-title { font-weight: bold; margin-bottom: 10px; }
.food-item { display: flex; gap: 10px; margin-bottom: 15px; }
.food-item img { width: 75px; height: 75px; border-radius: 5px; object-fit: cover; }
.food-info { flex: 1; position: relative; }
.foo.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0