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>
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/all.6.4.0.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        
        body {
            background-color: #f5f7fa;
            overflow: hidden;
            height: 100vh;
        }
        
        #canvas {
            position: absolute;
            top: 0;
            left: 0;
            width: 3000px;
            height: 2000px;
            cursor: grab;
            transition: transform 0.2s ease;
        }
        
        #canvas:active {
            cursor: grabbing;
        }
        
        .app-container {
            width: 375px;
            height: 812px;
            background-color: #ffffff;
            border: 1px solid #e0e0e0;
            border-radius: 24px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            overflow: hidden;
            position: absolute;
            padding: 0;
        }
        
        .app-header {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 44px;
            background-color: #ffffff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 18px;
            color: #1a1a1a;
            border-bottom: 1px solid #f0f0f0;
            z-index: 10;
        }
        
        .app-footer {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 56px;
            background-color: #ffffff;
            border-top: 1px solid #f0f0f0;
            display: flex;
            justify-content: space-around;
            align-items: center;
            z-index: 10;
        }
        
        .footer-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            font-size: 11px;
            color: #666666;
        }
        
        .footer-item.active {
            color: #2d8cf0;
        }
        
        .footer-item i {
            font-size: 22px;
            margin-bottom: 2px;
        }
        
        .app-content {
            position: absolute;
            top: 44px;
            left: 0;
            width: 100%;
            height: calc(100% - 100px);
            overflow-y: auto;
            padding: 16px;
        }
        
        .page-title {
            position: absolute;
            top: -36px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 16px;
            font-weight: 600;
            color: #333333;
            background-color: #f5f7fa;
            padding: 0 12px;
        }
        
        /* 首页样式 */
        .search-bar {
            width: 100%;
            height: 40px;
            background-color: #f5f7fa;
            border-radius: 20px;
            display: flex;
            align-items: center;
            padding: 0 16px;
            margin-bottom: 16px;
        }
        
        .search-bar i {
            color: #999999;
            margin-right: 8px;
        }
        
        .search-bar input {
            flex: 1;
            border: none;
            background: transparent;
            outline: none;
            font-size: 14px;
            color: #333333;
        }
        
        .carousel {
            width: 100%;
            height: 150px;
            border-radius: 12px;
            overflow: hidden;
            margin-bottom: 16px;
            position: relative;
        }
        
        .carousel-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .carousel-indicators {
            position: absolute;
            bottom: 8px;
            left: 0;
            width: 100%;
            display: flex;
            justify-content: center;
            gap: 6px;
        }
        
        .carousel-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background-color: rgba(255, 255, 255, 0.5);
        }
        
        .carousel-dot.active {
            background-color: #ffffff;
        }
        
        .category-tabs {
            display: flex;
            gap: 12px;
            margin-bottom: 16px;
            overflow-x: auto;
            padding-bottom: 4px;
        }
        
        .category-tab {
            padding: 8px 16px;
            background-color: #f5f7fa;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 500;
            color: #333333;
            white-space: nowrap;
        }
        
        .category-tab.active {
            background-color: #2d8cf0;
            color: #ffffff;
        }
        
        .recommend-list {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }
        
        .recommend-card {
            width: 100%;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        }
        
        .card-img {
            width: 100%;
            height: 180px;
            object-fit: cover;
        }
        
        .card-content {
            padding: 12px;
        }
        
        .card-title {
            font-size: 16px;
            font-weight: 600;
            color: #1a1a1a;
            margin-bottom: 4px;
        }
        
        .card-rating {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 12px;
            color: #666666;
            margin-bottom: 8px;
        }
        
        .rating-star {
            color: #ffc107;
        }
        
        .card-price {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .price-text {
            font-size: 18px;
            font-weight: 600;
            color: #ff4d4f;
        }
        
        .price-text span {
            font-size: 14px;
            font-weight: 400;
            color: #999999;
            text-decoration: line-through;
            margin-left: 4px;
        }
        
        .book-btn {
            padding: 6px 16px;
            background-color: #2d8cf0;
            color: #ffffff;
            border: none;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
        }
        
        /* 发现页样式 */
        .topic-section {
            margin-bottom: 24px;
        }
        
        .section-title {
            font-size: 18px;
            font-weight: 600;
            color: #1a1a1a;
            margin-bottom: 12px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .more-link {
            font-size: 14px;
            color: #2d8cf0;
            font-weight: 400;
        }
        
        .topic-cards {
            display: flex;
            gap: 12px;
            overflow-x: auto;
            padding-bottom: 8px;
        }
        
        .topic-card {
            width: 160px;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        }
        
        .topic-img {
            width: 100%;
            height: 100px;
            object-fit: cover;
        }
        
        .topic-content {
            padding: 8px;
        }
        
        .topic-title {
            font-size: 14px;
            font-weight: 500;
            color: #1a1a1a;
            margin-bottom: 4px;
        }
        
        .topic-desc {
            font-size: 12px;
            color: #666666;
        }
        
        .review-list {
            display: flex;
            flex-direction: column;
            gap: 16px;
            margin-bottom: 24px;
        }
        
        .review-card {
            width: 100%;
            border-radius: 12px;
            padding: 12px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        }
        
        .review-header {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 8px;
        }
        
        .review-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            object-fit: cover;
        }
        
        .review-user {
            flex: 1;
        }
        
        .user-name {
            font-size: 14px;
            font-weight: 500;
            color: #1a1a1a;
        }
        
        .review-time {
            font-size: 12px;
            color: #999999;
        }
        
        .review-content {
            font-size: 14px;
            color: #333333;
            margin-bottom: 8px;
        }
        
        .review-images {
            display: flex;
            gap: 8px;
            margin-bottom: 8px;
            overflow-x: auto;
            padding-bottom: 4px;
        }
        
        .review-img {
            width: 80px;
            height: 80px;
            border-radius: 8px;
            object-fit: cover;
            flex-shrink: 0;
        }
        
        .review-actions {
            display: flex;
            gap: 16px;
            font-size: 12px;
            color: #666666;
        }
        
        .action-item {
            display: flex;
            align-items: center;
            gap: 4px;
        }
        
        /* 详情页样式 */
        .detail-carousel {
            width: 100%;
            height: 220px;
            position: relative;
            margin-bottom: 16px;
        }
        
        .detail-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .collect-btn {
            position: absolute;
            top: 16px;
            right: 16px;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background-color: rgba(255, 255, 255, 0.8);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #ff4d4f;
            font-size: 18px;
        }
        
        .detail-header {
            margin-bottom: 16px;
        }
        
        .detail-title {
            font-size: 20px;
            font-weight: 600;
            color: #1a1a1a;
            margin-bottom: 8px;
        }
        
        .detail-rating {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 8px;
        }
        
  .........完整代码请登录后点击上方下载按钮下载查看

网友评论0