css+div布局实现咸鱼二手交易平台app的ui原型图代码

代码语言:html

所属分类:布局界面

代码描述:css+div布局实现咸鱼二手交易平台app的ui原型图代码, 图片采用picsum.photos

代码标签: css div 布局 咸鱼 二手 交易 平台 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>
    <!-- 引入 Bootstrap Icons -->
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/bootstrap-icons.1.11.3.css">
    <style>
        /* 全局重置与基础样式 */
        :root {
            --primary-color: #ff6f3d;
            --primary-light-color: #fff3f0;
            --text-color: #333;
            --text-secondary-color: #666;
            --text-light-color: #999;
            --bg-color: #f5f5f5;
            --white-color: #fff;
            --border-color: #eee;
            --border-light-color: #f0f0f0;
            --star-color: #ffd700;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html {
            height: 100%;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background: #e0e0e0;
            color: var(--text-color);
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: flex-start; /* 从左开始排列 */
            overflow-x: auto; /* 允许横向滚动 */
            padding: 20px;
        }

        /* 页面容器 - 横向排列 */
        .page-container {
            display: flex;
            gap: 20px; /* 页面之间的间距 */
            height: 95vh;
            max-height: 896px; /* 模拟iPhone Pro Max高度 */
        }

        .page {
            width: 414px; /* 统一页面宽度 */
            flex-shrink: 0;
            background: var(--white-color);
            box-shadow: 0 4px 20px rgba(0,0,0,0.1);
            border-radius: 20px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            position: relative;
        }
        
        .page-content {
            flex-grow: 1;
            overflow-y: auto;
        }
        
        .page-title-header {
            text-align: center;
            padding: 15px;
            background: var(--primary-color);
            color: var(--white-color);
            font-size: 18px;
            font-weight: bold;
            flex-shrink: 0;
        }

        /* 通用组件 */
        .navbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 16px;
            background: var(--white-color);
            border-bottom: 1px solid var(--border-color);
            flex-shrink: 0;
            height: 50px;
        }
        .navbar-title {
            font-size: 18px;
            font-weight: 600;
        }
        .navbar-icon {
            font-size: 24px;
            cursor: pointer;
        }

        .btn {
            padding: 12px;
            border: none;
            border-radius: 24px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            text-align: center;
        }
        .btn-primary {
            background: var(--primary-color);
            color: var(--white-color);
        }
        .btn-secondary {
            background: var(--primary-light-color);
            color: var(--primary-color);
        }

        .bottom-bar {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            width: 100%;
            display: flex;
            align-items: center;
            padding: 12px 16px;
            background: var(--white-color);
            border-top: 1px solid var(--border-color);
            gap: 12px;
        }

        .bottom-nav {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            width: 100%;
            display: flex;
            background: var(--white-color);
            border-top: 1px solid var(--border-color);
            padding: 8px 0;
        }
        .nav-item {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            cursor: pointer;
            color: var(--text-secondary-color);
        }
        .nav-item.active { color: var(--primary-color); }
        .nav-icon { font-size: 24px; }
        .nav-text { font-size: 11px; }
        .publish-btn {
            width: 56px;
            height: 40px;
            background: var(--primary-color);
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--white-color);
            font-size: 28px;
            margin-top: -15px;
            box-shadow: 0 4px 10px rgba(255, 111, 61, 0.4);
        }
        
        .info-section {
            background: var(--white-color);
            padding: 16px;
            border-radius: 8px;
            margin-bottom: 12px;
        }

        .section-title {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 12px;
        }
        
        /* 表单样式 */
        .form-group { margin-bottom: 20px; }
        .form-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text-color); }
        .form-input, .form-textarea { width: 100%; padding: 12px; border: 1px solid #e0e0e0; border-radius: 8px; font-size: 14px; }
        .form-textarea { min-height: 120px; resize: vertical; }

        /* 标签 */
        .tag-list { display: flex; flex-wrap: wrap; gap: 10px; }
        .tag-item { padding: 8px 16px; border: 1px solid #e0e0e0; border-radius: 20px; font-size: 14px; cursor: pointer; }
        .tag-item.selected { background: var(--primary-color); color: var(--white-color); border-color: var(--primary-color); }

        /* 边距 */
        .pb-80 { padding-bottom: 80px; }
        .pb-60 { padding-bottom: 60px; }

        /* 1. 首页 */
        .search-bar { padding: 12px 16px; background: var(--white-color); }
        .search-input { width: 100%; padding: 10px 16px; border: none; background: var(--bg-color); border-radius: 20px; font-size: 14px; }
        .category-tabs { display: flex; padding: 12px 16px; background: var(--white-color); overflow-x: auto; gap: 12px; border-bottom: 1px solid var(--border-color); }
        .category-tab { padding: 6px 16px; background: var(--bg-color); border-radius: 16px; white-space: nowrap; font-size: 14px; cursor: pointer; }
        .category-tab.active { background: var(--primary-color); color: var(--white-color); }
        .product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 12px; background: var(--bg-color); }
        .product-card { background: var(--white-color); border-radius: 8px; overflow: hidden; cursor: pointer; }
        .product-image { width: 100%; height: 180px; object-fit: cover; background: #e0e0e0; }
        .product-info { padding: 10px; }
        .product-title { font-size: 14px; line-height: 1.4; height: 40px; overflow: hidden; margin-bottom: 8px; }
        .product-price { color: var(--primary-color); font-size: 18px; font-weight: bold; margin-bottom: 6px; }
        .product-meta { display: flex; justify-content: space-betwe.........完整代码请登录后点击上方下载按钮下载查看

网友评论0