vue实现电商app可交互原型图ui代码

代码语言:html

所属分类:电商

代码描述:vue实现电商app可交互原型图ui代码

代码标签: 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>电商App原型图</title>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/vue@2.6.1-dev.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
        }
        
        body {
            background-color: #f0f0f0;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            padding: 20px;
        }
        
        .phone-container {
            width: 375px;
            height: 750px;
            position: relative;
            border-radius: 40px;
            background-color: #1a1a1a;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
            padding: 10px;
            overflow: hidden;
        }
        
        .phone-screen {
            width: 355px;
            height: 730px;
            background-color: #fff;
            border-radius: 30px;
            overflow: hidden;
            position: relative;
        }
        
        .phone-notch {
            position: absolute;
            width: 150px;
            height: 30px;
            background-color: #1a1a1a;
            top: 0;
            left: 50%;
            transform: translateX(-50%);
            border-bottom-left-radius: 15px;
            border-bottom-right-radius: 15px;
            z-index: 9;
        }
        
 .app-content {
            height: 730px;
            overflow-y: auto;
            position: relative;
            padding-bottom: 60px;
        }
        
        /* 导航栏样式 */
        .navbar {
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 15px;
            position: sticky;
            top: 0;
            background-color: #fff;
            z-index: 5;
            border-bottom: 1px solid #eee;
        }
        
        .navbar h1 {
            font-size: 18px;
            font-weight: 600;
        }
        
        .back-btn {
            font-size: 20px;
            background: none;
            border: none;
            cursor: pointer;
        }
        
   .bottom-nav {
            display: flex;
            justify-content: space-around;
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 60px;
            background-color: #fff;
            border-top: 1px solid #eee;
            z-index: 5;
        }
        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            width: 25%;
        }
        
        .nav-item.active {
            color: #ff6b00;
        }
        
        /* 首页样式 */
        .banner {
            height: 180px;
            width: 100%;
            background-size: cover;
            background-position: center;
            position: relative;
        }
        
        .categories {
            display: flex;
            padding: 15px 10px;
            overflow-x: auto;
            background-color: #fff;
            margin-bottom: 10px;
        }
        
        .category {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin: 0 10px;
            min-width: 60px;
            cursor: pointer;
        }
        
        .category-icon {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background-color: #f5f5f5;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 5px;
            font-size: 24px;
            color: #ff6b00;
        }
        
        .category span {
            font-size: 12px;
        }
        
        .product-list {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
            padding: 10px;
        }
        
        .product-card {
            background-color: #fff;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            cursor: pointer;
        }
        
        .product-img {
            height: 150px;
            width: 100%;
            background-size: cover;
            background-position: center;
        }
        
        .product-info {
            padding: 10px;
        }
        
        .product-title {
            font-size: 14px;
            margin-bottom: 5px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
        }
        
        .product-price {
            color: #ff6b00;
            font-weight: bold;
            font-size: 16px;
        }
        
        /* 商品详情页样式 */
        .product-detail-img {
            height: 350px;
            width: 100%;
            background-size: cover;
            background-position: center;
        }
        
        .product-detail-info {
            padding: 15px;
            background-color: #fff;
        }
        
        .product-detail-title {
            font-size: 18px;
            margin-bottom: 10px;
        }
        
        .product-detail-price {
            color: #ff6b00;
            font-weight: bold;
            font-size: 24px;
            margin-bottom: 15px;
        }
        
        .product-description {
            margin-top: 15px;
            color: #666;
            font-size: 14px;
            line-height: 1.5;
        }
        
        .action-buttons {
            display: flex;
            position: absolute;
            bottom: 60px;
            left: 0;
            width: 100%;
            padding: 10px;
            background-color: #fff;
            box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
            z-index: 4;
        }

      
        .add-to-cart, .buy-now {
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: none;
            color: #fff;
            font-weight: bold;
            border-radius: 20px;
            cursor: pointer;
        }
        
        .add-to-cart {
            background-color: #ff9900;
            flex: 1;
            margin-right: 10px;
        }
        
        .buy-now {
            background-color: #ff6b00;
            flex: 1;
        }
        
        /* 分类页面样式 */
        .category-container {
            display: flex;
            height: calc(100% - 120px);
        }
        
        .category-sidebar {
            width: 80px;
            background-color: #f8f8f8;
            overflow-y: auto;
            height: 100%;
        }
        
        .sidebar-item {
            height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-bottom: 1px solid #eee;
            font-size: 14px;
            cursor: pointer;
        }
        
        .sidebar-item.active {
            background-color: #fff;
            color: #ff6b00;
            border-left: 3px solid #ff6b00;
        }
        
        .category-content {
            flex: 1;
            padding: 10px;
            overflow-y: auto;
            height: 100%;
        }
        
        .subcategory {
            margin-bottom: 15px;
        }
        
        .subcategory-title {
            fon.........完整代码请登录后点击上方下载按钮下载查看

网友评论0