svg+css布局炫酷ai聊天智能体开始页面ui界面代码
代码语言:html
所属分类:布局界面
代码描述:svg+css布局炫酷ai聊天智能体开始页面ui界面代码
代码标签: svg css 布局 炫 酷ai 聊天 智能体 开始 页面 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>AI Bot</title> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet"> <style> /* --- CSS变量定义 --- */ :root { --bg-sidebar: #171717; --bg-main: #212121; --bg-card: rgba(41, 41, 41, 0.8); --bg-input: #333333; --bg-button-primary: #8A3FFC; --bg-button-primary-hover: #772ce8; --text-primary: #F4F4F4; --text-secondary: #A8A8A8; --border-color: #393939; --glow-color: rgba(138, 63, 252, 0.3); } /* --- 基础与重置样式 --- */ * { margin: 0; padding: 0; box-sizing: border-box; } html, body { height: 100%; overflow: hidden; /* 防止页面滚动 */ } body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background-color: var(--bg-main); color: var(--text-primary); display: flex; } button, input { font-family: inherit; border: none; outline: none; } /* --- 主布局容器 --- */ .app-container { display: flex; width: 100%; height: 100%; } /* --- 侧边栏 --- */ .sidebar { width: 260px; background-color: var(--bg-sidebar); display: flex; flex-direction: column; padding: 16px; flex-shrink: 0; border-right: 1px solid var(--border-color); } .sidebar-header { display: flex; align-items: center; gap: 12px; padding: 8px; margin-bottom: 24px; } .sidebar-header .logo { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background-color: var(--bg-button-primary); border-radius: 8px; } .sidebar-header .logo svg { width: 20px; height: 20px; color: white; } .sidebar-header .title { font-size: 20px; font-weight: 600; } .new-chat-btn { width: 100%; padding: 12px; background-color: var(--bg-button-primary); color: var(--text-primary); font-size: 14px; font-weight: 500; border-radius: 8px; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: background-color 0.2s ease; margin-bottom: 16px; } .new-chat-btn:hover { background-color: var(--bg-button-primary-hover); } .search-box { position: relative; } .search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); } .search-input { width: 100%; background-color: var(--bg-main); border: 1px solid var(--border-color); border-radius: 8px; padding: 10px 12px 10px 40px; color: var(--text-primary); font-size: 14px; } .search-input::placeholder { color: var(--text-secondary); } .sidebar-footer { margin-top: auto; /* 将页脚推到底部 */ } .sidebar-footer .help-link { display: flex; align-items: center; gap: 10px; padding: 10px 8px; font-size: 14px; color: var(--text-secondary); text-decoration: none; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0