Spaces:
Sleeping
Sleeping
Update styles.py
Browse files
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 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
min-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
flex-shrink: 0;
|
| 171 |
-
align-self: flex-start;
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 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 |
-
/*
|
| 187 |
-
.custom-chatbot .message{
|
| 188 |
-
|
| 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){
|