vue3布局实现酷黑智能家居物联网中控台ui原型图代码
代码语言:html
所属分类:布局界面
代码描述:vue 布局 酷黑 智能 家居 物联网 中控台 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: #1a1b1e; --sidebar-bg: #222327; --surface-color: #2c2d30; --primary-color: #00aaff; --accent-color: #ff9900; --text-color: #f0f0f0; --text-secondary-color: #a0a0a0; --border-color: #3a3b3e; } * { 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 { height: 100%; width: 100%; } /* 页面过渡动画 */ .fade-enter-active, .fade-leave-active { transition: opacity 0.25s ease-out; } .fade-enter-from, .fade-leave-to { opacity: 0; } /* --- 主布局 --- */ .app-layout { display: flex; height: 100%; } /* --- 侧边导航栏 --- */ .sidebar { width: 90px; background-color: var(--sidebar-bg); flex-shrink: 0; display: flex; flex-direction: column; align-items: center; padding: 20px 0; border-right: 1px solid var(--border-color); } .logo { width: 40px; height: 40px; margin-bottom: 30px; } .nav-menu { display: flex; flex-direction: column; gap: 15px; align-items: center; } .nav-button { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 70px; height: 70px; border-radius: 12px; background: none; border: none; color: var(--text-secondary-color); cursor: pointer; transition: all 0.2s ease; } .nav-button svg { width: 28px; height: 28px; margin-bottom: 5px; } .nav-button.active { background-color: var(--primary-color); color: white; } .nav-button:not(.active):hover { background-color: var(--surface-color); } /* --- 主内容区 --- */ .main-content { flex-grow: 1; padding: 30px; overflow-y: auto; height: 100vh; } .main-content::-webkit-scrollbar { width: 6px; } .main-content::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; } /* --- 通用组件样式 --- */ .page-header { margin-bottom: 25px; } .page-header h1 { font-size: 2.2rem; font-weight: 700; } .page-header p { color: var(--text-secondary-color); font-size: 1.1rem; } .grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; } .card { background-color: var(--surface-color); border-radius: 16px; padding: 20px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); transition: transform 0.2s ease, box-shadow 0.2s ease; } .card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25); } /* --- 首页 (Dashboard) --- */ .dashboard-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 25px; } .weather-info .temperature { font-size: 3rem; font-weight: 700; } .weather-info .details { color: var(--text-secondary-color); } .quick-scenes .grid-container { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } .scene-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 25px 15px; cursor: pointer; } .scene-card svg { width: 32px; height: 32px; color: var(--primary-color); } .scene-card span { font-weight: 500; } .section-title { font-size: 1.5rem; font-weight: 600; margin-bottom: 15px; } #energy-chart { width: 100%; height: 250px; } .status-overview .status-item { display: flex; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--border-color); } .status-overview .status-item:last-child { border-bottom: none; } .status-overview svg { width: 24px; height: 24px; color: var(--text-secondary-color); margin-right: 15px; } .status-overview .label { flex-grow: 1; } .status-overview .value { font-weight: 600; color: var(--accent-color); } /* --- 灯光页面 --- */ .light-room-card .card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } .light-room-card h3 { font-size: 1.2rem; } .light-room-card .status { font-size: 0.9rem; color: var(--text-secondary-color); } .light-controls .light-item { .........完整代码请登录后点击上方下载按钮下载查看
网友评论0