AlauStone commited on
Commit
03220e1
·
verified ·
1 Parent(s): 89e0894

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -14
app.py CHANGED
@@ -147,6 +147,32 @@ def inject_custom_css():
147
  background: white !important;
148
  }
149
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150
  /* 主内容区域底部留出空间 */
151
  .block-container {
152
  bottom: 7rem !important;
@@ -1485,17 +1511,3 @@ with _btn_cols[1]:
1485
  st.rerun()
1486
 
1487
  _chat_fragment()
1488
-
1489
- # popover 向上展开的 CSS(放在最后确保生效)
1490
- st.markdown("""
1491
- <style>
1492
- /* popover 向上展开 */
1493
- [data-testid="stPopoverBody"] {
1494
- bottom: 100% !important;
1495
- top: auto !important;
1496
- margin-bottom: 0.5rem !important;
1497
- transform: translateY(0) !important;
1498
- }
1499
- </style>
1500
- """, unsafe_allow_html=True)
1501
-
 
147
  background: white !important;
148
  }
149
 
150
+ /* 底部工具栏固定在搜索框下方 */
151
+ .stMainBlockContainer > div > div > div:has([data-testid="stPopover"]) {
152
+ position: fixed !important;
153
+ bottom: 0.3rem !important;
154
+ left: 50% !important;
155
+ transform: translateX(-50%) !important;
156
+ width: calc(100% - 2rem) !important;
157
+ max-width: 730px !important;
158
+ z-index: 9998 !important;
159
+ }
160
+ .stMainBlockContainer > div > div > div:has([data-testid="stPopover"]) [data-testid="stHorizontalBlock"] {
161
+ display: flex !important;
162
+ flex-wrap: nowrap !important;
163
+ gap: 0.5rem !important;
164
+ }
165
+ .stMainBlockContainer > div > div > div:has([data-testid="stPopover"]) [data-testid="stHorizontalBlock"] > div {
166
+ flex: 1 !important;
167
+ min-width: 0 !important;
168
+ }
169
+ /* popover 向上展开 */
170
+ [data-testid="stPopoverBody"] {
171
+ bottom: 100% !important;
172
+ top: auto !important;
173
+ margin-bottom: 0.5rem !important;
174
+ }
175
+
176
  /* 主内容区域底部留出空间 */
177
  .block-container {
178
  bottom: 7rem !important;
 
1511
  st.rerun()
1512
 
1513
  _chat_fragment()