Estazz commited on
Commit
77eca5d
·
verified ·
1 Parent(s): b22330e

Update styles.py

Browse files
Files changed (1) hide show
  1. styles.py +23 -28
styles.py CHANGED
@@ -157,40 +157,35 @@ position:absolute; right:16px; top:10px; font-weight:700; font-size:28px; letter
157
  /* === Chatbot 头像尺寸 & 对齐(稳定版)=== */
158
 
159
  /* 1) 用容器来做圆形与描边,更不易错位 */
160
- .custom-chatbot .avatar{
161
- width: 80px; /* 想更大改成 44px */
162
- height: 80px;
163
- min-width: 80px;
164
- min-height: 80px;
165
- border-radius: 9999px;
166
- overflow: hidden; /* 把内部图像裁剪成圆形 */
167
- border: 5px solid #ffffffcc; /* 半透明白描边 */
168
- box-shadow: 0 2px 6px rgba(0,0,0,.25);
169
- background: transparent;
170
- flex-shrink: 0;
171
- align-self: flex-start; /* 与气泡顶部对齐,避免“头像偏下” */
172
- margin-top: 10px; /* 轻微上移,让视觉更齐 */
173
- }
174
-
175
- /* 2) 图片填充容器,避免被拉伸/留白/偏移 */
176
  .custom-chatbot .avatar-image{
177
  width: 100% !important;
178
  height: 100% !important;
179
- object-fit: cover; /* 等比铺满 */
180
- object-position: 50% 50%; /* 居中人物脸部 */
181
- display: block;
 
182
  background: transparent !important;
183
- border: none !important; /* 边框交给容器处理 */
184
  }
185
 
186
- /* 3) 气泡与头像的布局再细调一下 */
187
- .custom-chatbot .message{
188
- align-items: flex-start; /* 顶部对齐,避免头像和气泡错层 */
189
- gap: 10px; /* 头像与气泡的水平间距 */
190
- }
191
- .custom-chatbot .message .message-content{
192
- margin-top: 2px; /* 让气泡首行与头像更齐平 */
193
- }
194
 
195
  /* 4) 移动端略微缩小 */
196
  @media (max-width: 820px){
 
157
  /* === Chatbot 头像尺寸 & 对齐(稳定版)=== */
158
 
159
  /* 1) 用容器来做圆形与描边,更不易错位 */
160
+ .custom-chatbot .avatar,
161
+ .custom-chatbot .message .avatar{
162
+ width: 72px !important; /* ← 改这里:56/64/72 都可以 */
163
+ height: 72px !important;
164
+ min-width: 72px !important;
165
+ min-height: 72px !important;
166
+ border-radius: 9999px !important;
167
+ overflow: hidden !important;
168
+ border: 2px solid #ffffffcc !important; /* 可选描边 */
169
+ box-shadow: 0 2px 6px rgba(0,0,0,.25) !important;
170
+ flex-shrink: 0 !important;
171
+ align-self: flex-start !important; /* 与气泡顶部对齐 */
172
+ }
173
+
174
+ /* 头像图片填充容器,不变形 */
175
+ .custom-chatbot .avatar > img,
176
  .custom-chatbot .avatar-image{
177
  width: 100% !important;
178
  height: 100% !important;
179
+ object-fit: cover !important; /* 若想完整显示头像不裁剪,改为 contain */
180
+ object-position: 50% 50% !important;
181
+ display: block !important;
182
+ border: 0 !important;
183
  background: transparent !important;
 
184
  }
185
 
186
+ /* 头像与气泡间距与齐(可选) */
187
+ .custom-chatbot .message{ gap: 12px !important; align-items: flex-start !important; }
188
+ .custom-chatbot .message .message-content{ margin-top: 2px !important; }
 
 
 
 
 
189
 
190
  /* 4) 移动端略微缩小 */
191
  @media (max-width: 820px){