s880453 commited on
Commit
5b5d8c1
·
verified ·
1 Parent(s): 8e0e2ce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -0
app.py CHANGED
@@ -1027,10 +1027,12 @@ def recommend_chart_settings(df):
1027
  return recommendation
1028
 
1029
  # CSS樣式
 
1030
  CUSTOM_CSS = """
1031
  .gradio-container {
1032
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
1033
  background: linear-gradient(to bottom right, #f7f9fc, #e9f0f8);
 
1034
  }
1035
 
1036
  .app-header {
@@ -1153,6 +1155,30 @@ CUSTOM_CSS = """
1153
  .loading {
1154
  animation: pulse 1.5s infinite;
1155
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1156
  """
1157
 
1158
  # 現代化UI界面
 
1027
  return recommendation
1028
 
1029
  # CSS樣式
1030
+
1031
  CUSTOM_CSS = """
1032
  .gradio-container {
1033
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
1034
  background: linear-gradient(to bottom right, #f7f9fc, #e9f0f8);
1035
+ overflow: visible !important;
1036
  }
1037
 
1038
  .app-header {
 
1155
  .loading {
1156
  animation: pulse 1.5s infinite;
1157
  }
1158
+
1159
+ /* 下拉選單位置修正 */
1160
+ .gradio-dropdown {
1161
+ position: relative !important;
1162
+ }
1163
+
1164
+ .gradio-dropdown .choices__list--dropdown {
1165
+ position: absolute !important;
1166
+ top: 100% !important;
1167
+ left: 0 !important;
1168
+ z-index: 1000 !important;
1169
+ max-height: 300px !important;
1170
+ overflow-y: auto !important;
1171
+ background: white !important;
1172
+ border: 1px solid #ddd !important;
1173
+ border-radius: 4px !important;
1174
+ width: 100% !important;
1175
+ }
1176
+
1177
+ /* 確保下拉項目可見 */
1178
+ .gradio-dropdown .choices__list--dropdown .choices__item {
1179
+ padding: 8px 10px !important;
1180
+ cursor: pointer !important;
1181
+ }
1182
  """
1183
 
1184
  # 現代化UI界面