init
This commit is contained in:
67
app/static/css/custom.css
Normal file
67
app/static/css/custom.css
Normal file
@@ -0,0 +1,67 @@
|
||||
/* static/css/custom.css */
|
||||
|
||||
/* 全局样式调整 */
|
||||
body {
|
||||
background-color: #f8f9fa;
|
||||
}
|
||||
|
||||
/* 聊天框样式 */
|
||||
.chat-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.message {
|
||||
max-width: 80%;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.message-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 0.85em;
|
||||
margin-bottom: 5px;
|
||||
color: #6c757d;
|
||||
}
|
||||
|
||||
.message-body {
|
||||
padding: 10px 15px;
|
||||
border-radius: 15px;
|
||||
line-height: 1.5;
|
||||
word-wrap: break-word; /* 保证长单词或链接换行 */
|
||||
}
|
||||
|
||||
/* 用户消息(靠左)*/
|
||||
.user-message {
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
.user-message .message-body {
|
||||
background-color: #e9ecef;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
/* 管理员消息(靠右)*/
|
||||
.admin-message {
|
||||
align-self: flex-end;
|
||||
}
|
||||
|
||||
.admin-message .message-header {
|
||||
flex-direction: row-reverse; /* 时间和名字换位置 */
|
||||
}
|
||||
|
||||
.admin-message .message-body {
|
||||
background-color: #0d6efd;
|
||||
color: white;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
/* 表单和表格对齐 */
|
||||
.table.align-middle th,
|
||||
.table.align-middle td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.description-text {
|
||||
white-space: pre-wrap; /* 保留空格和换行符,并允许自动换行 */
|
||||
word-break: break-all; /* 防止长单词溢出 */
|
||||
}
|
||||
Reference in New Issue
Block a user