vue3布局实现酷黑汽车驾驶中控台ui原型图代码

代码语言:html

所属分类:布局界面

代码描述:vue3布局实现酷黑汽车驾驶中控台ui原型图代码

代码标签: vue 布局 酷黑 汽车 驾驶 中控台 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>高端汽车中控UI原型</title>
    <!-- Vue 3 CDN -->
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/vue3.2.22.js"></script>
    <!-- ECharts CDN -->
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/echarts.5.5.0.js"></script>
    <style>
        /* 全局样式与设计 */
        @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

        :root {
            --bg-color: #121212;
            --surface-color: #1e1e1e;
            --primary-color: #3b82f6;
            --text-color: #e0e0e0;
            --text-secondary-color: #a0a0a0;
            --border-color: #333;
        }

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

        html, body {
            background-color: var(--bg-color);
            color: var(--text-color);
            font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
            font-size: 16px;
            overflow: hidden;
            height: 100vh;
            width: 100vw;
            user-select: none;
        }

        #app {
            display: flex;
            flex-direction: column;
            height: 100%;
            width: 100%;
            background: var(--bg-color);
        }
        
        /* 页面过渡动画 */
        .fade-enter-active, .fade-leave-active {
            transition: opacity 0.3s ease;
        }
        .fade-enter-from, .fade-leave-to {
            opacity: 0;
        }

        /* --- 主容器布局 --- */
        .main-container {
            flex-grow: 1;
            display: flex;
            padding: 20px;
            overflow: hidden;
        }

        .main-content {
            flex-grow: 1;
            height: 100%;
            overflow-y: auto;
            -ms-overflow-style: none; /* IE and Edge */
            scrollbar-width: none; /* Firefox */
        }
        .main-content::-webkit-scrollbar {
            display: none; /* Chrome, Safari, and Opera */
        }
        
        /* --- 底部导航栏 --- */
        .bottom-nav {
            flex-shrink: 0;
            display: flex;
            justify-content: space-around;
            align-items: center;
            height: 80px;
            background-color: rgba(30, 30, 30, 0.8);
            backdrop-filter: blur(10px);
            border-top: 1px solid var(--border-color);
        }

        .nav-button {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background: none;
            border: none;
            color: var(--text-secondary-color);
            cursor: pointer;
            transition: all 0.2s ease;
            padding: 10px;
            border-radius: 8px;
            width: 70px;
        }
        .nav-button svg {
            width: 28px;
            height: 28px;
            margin-bottom: 5px;
        }
        .nav-button.active {
            color: var(--primary-color);
        }
        .nav-button:hover {
            background-color: rgba(255, 255, 255, 0.1);
        }

        /* --- 通用组件样式 --- */
        .card {
            background-color: var(--surface-color);
            border-radius: 16px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        }
        h1, h2, h3 {
            font-weight: 600;
            margin-bottom: 15px;
        }
        h1 { font-size: 2rem; }
        h2 { font-size: 1.5rem; }

        /* --- 主屏幕 specific styles --- */
        .home-view {
            display: flex;
            flex-direction: column;
            height: 100%;
        }
        .car-status-container {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
        }
        .car-image {
            width: 80%;
            max-width: 600px;
            object-fit: contain;
        }
        .status-bar {
            display: flex;
            justify-content: space-around;
            width: 100%;
            margin-top: 20px;
            padding: 0 5%;
        }
        .status-item {
            display: flex;
            align-items: center;
        }
        .status-item svg {
            width: 24px;
            height: 24px;
            margin-right: 10px;
            color: var(--text-secondary-color);
        }
        .status-text {
            font-size: 1.2rem;
            font-weight: 500;
        }

        .quick-access-cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-top: 20px;
        }
        .quick-card {
            background-color: var(--surface-color);
            border-radius: 16px;
            padding: 20px;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .quick-card:hover {
            transform: translateY(-5px);
            background-color: #2a2a2a;
        }
        .quick-card-header {
            display: flex;
            align-items: center;
            margin-bottom: 10px;
        }
        .quick-card-header svg {
            width: 24px;
            height: 24px;
            margin-right: 10px;
            color: var(--primary-color);
        }
        .quick-card-title {
            font-size: 1.2rem;
            font-weight: 600;
        }
        .quick-card-content {
            font-size: 1rem;
            color: var(--text-secondary-color);
        }

        /* --- 导航页面 --- */
        .nav-view {
            display: flex;
            flex-direction: column;
        }
        .map-placeholder {
            width: 100%;
            height: 300px;
            border-radius: 16px;
            object-fit: cover;
            margin-bottom: 20px;
        }
        .search-form {
            display: flex;
            margin-bottom: 20px;
        }
        .search-input {
            flex-grow: 1;
            padding: 12px 15px;
            font-size: 1rem;
            border-radius: 8px 0 0 8px;
            border: 1px solid var(--border-color);
            background-color: #2a2a2a;
            color: var(--text-color);
            outline: none;
        }
        .search-button {
            padding: 12px 20px;
            font-size: 1rem;
            border: 1px solid var(--primary-color);
            background-color: var(--primary-color);
            color: white;
            border-radius: 0 8px 8px 0;
            cursor: pointer;
        }
        .destination-list-item {
            display: flex;
            align-items: center;
            padding: 15px;
            border-bottom: 1px solid var(--border-color);
            transition: background-color 0.2s ease;
        }
        .destination-list-item:hover {
            background-color: #2a2a2a;
        }
        .destination-icon {
            color: var(--text-secondary-color);
            margin-right: 15px;
        }
        .destination-name {
            flex-grow: 1;
            font-size: 1.1rem;
        }
        .delete-btn {
            background: none;
            border: none;
            color: #ef4444;
            cursor: pointer;
            padding: 5px;
        }
        .delete-btn svg { width: 20px; height: 20px; }
        
        /* --- 空调页面 --- */
        .climate-view {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 30px;
            align-items: center;
        }
        .temp-control {
            display: flex;
            flex-direction: column;
            align-items: center;
            background-color: var(--surface-color);
            border-radius: 100px;
            padding: 30px 20px;
        }
        .temp-display {
            font-size: 3.5rem;
            font-weight: 700;
            margin-bottom: 15px;
        }
        .temp-adjust-btn {
            font-size: 2rem;
            background: none;
            border: none;
            color: var(--text-secondary-color);
            cursor: pointer;
            padding: 10px;
        }
        .temp-adjust-btn.up { color: #ef4444; }
        .temp-adjust-btn.down { color: #3b82f6; }
        .climate-options {
            display: flex;
            f.........完整代码请登录后点击上方下载按钮下载查看

网友评论0