div+css布局实现简洁的ai大模型聊天助手代码
代码语言:html
所属分类:布局界面
代码描述:div+css布局实现简洁的ai大模型聊天助手代码
代码标签: div css 布局 简洁 ai 大模型 聊天 助手 代码
下面为部分代码预览,完整代码请点击下载或在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智能助手</title>
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/all.6.4.0.css">
<style>
:root {
--primary-color: #641acf;
--user-bubble: #419fff;
--ai-bubble: #f0f4f8;
--text-dark: #333;
--text-light: #fff;
--shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background-color: #f9f9f9;
color: var(--text-dark);
height: 100vh;
display: flex;
}
/* 侧边历史记录面板 */
.history-panel {
width: 280px;
background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
border-right: 1px solid #e0e0e0;
height: 100vh;
overflow-y: auto;
transition: all 0.3s ease;
}
.history-panel.collapsed {
transform: translateX(-100%);
width: 0;
opacity: 0;
}
.history-header {
padding: 20px;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #e0e0e0;
}
.history-header h3 {
font-size: 18px;
color: var(--primary-color);
}
.toggle-history {
background: none;
border: none;
color: var(--primary-color);
cursor: pointer;
font-size: 14px;
}
.history-list {
padding: 10px;
}
.history-item {
padding: 12px;
margin-bottom: 8px;
background: white;
border-radius: 8px;
cursor: pointer;
transition: all 0.2s;
box-shadow: var(--shadow);
}
.history-item:hover {
background: #f0f0f0;
}
.history-item.active {
background: var(--primary-color);
color: white;
}
.history-question {
font-size: 14px;
margin-bottom: 4px;
white-space: nowrap;
overflow: hidden;
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0