Chaplain0908 commited on
Commit
fa22349
·
verified ·
1 Parent(s): ba23aff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +49 -9
app.py CHANGED
@@ -90,31 +90,71 @@ st.markdown("""
90
  color: #333333 !important;
91
  }
92
 
93
- /* Streamlit 组件强制浅色 */
 
 
 
 
 
 
 
 
 
 
 
94
  [data-baseweb="select"],
95
  [data-baseweb="input"],
96
- [data-baseweb="popover"],
97
- .stSelectbox > div,
98
- .stTextInput > div {
99
  background-color: #ffffff !important;
100
  color: #333333 !important;
 
101
  }
102
 
103
- [data-baseweb="select"] > div {
 
 
104
  background-color: #ffffff !important;
105
- border-color: #ccc !important;
106
  }
107
 
108
- /* 下拉菜单选项 */
 
109
  [data-baseweb="menu"],
110
  [data-baseweb="list"],
111
- [role="listbox"] {
 
 
 
 
 
 
 
 
 
 
112
  background-color: #ffffff !important;
113
  color: #333333 !important;
114
  }
 
 
 
 
 
 
 
 
 
 
 
 
115
 
116
  /* 单选按钮 */
117
- .stRadio label {
 
 
 
 
118
  color: #333333 !important;
119
  }
120
 
 
90
  color: #333333 !important;
91
  }
92
 
93
+ /* 下拉框和输入框的标签文字 */
94
+ .stSelectbox label,
95
+ .stTextInput label,
96
+ .stRadio label,
97
+ .stSelectbox label p,
98
+ .stTextInput label p,
99
+ [data-testid="stWidgetLabel"],
100
+ [data-testid="stWidgetLabel"] p {
101
+ color: #333333 !important;
102
+ }
103
+
104
+ /* 下拉框容器 */
105
  [data-baseweb="select"],
106
  [data-baseweb="input"],
107
+ .stSelectbox [data-baseweb="select"],
108
+ .stTextInput input {
 
109
  background-color: #ffffff !important;
110
  color: #333333 !important;
111
+ border-color: #ccc !important;
112
  }
113
 
114
+ /* 下拉框内部 */
115
+ [data-baseweb="select"] > div,
116
+ [data-baseweb="select"] > div > div {
117
  background-color: #ffffff !important;
118
+ color: #333333 !important;
119
  }
120
 
121
+ /* 下拉菜单弹出层 */
122
+ [data-baseweb="popover"],
123
  [data-baseweb="menu"],
124
  [data-baseweb="list"],
125
+ [role="listbox"],
126
+ ul[role="listbox"],
127
+ [data-baseweb="popover"] > div {
128
+ background-color: #ffffff !important;
129
+ color: #333333 !important;
130
+ }
131
+
132
+ /* 下拉菜单选项 */
133
+ [role="option"],
134
+ [data-baseweb="menu"] li,
135
+ li[role="option"] {
136
  background-color: #ffffff !important;
137
  color: #333333 !important;
138
  }
139
+ [role="option"]:hover,
140
+ li[role="option"]:hover {
141
+ background-color: #f0f0f0 !important;
142
+ }
143
+
144
+ /* 文本输入框 */
145
+ .stTextInput input,
146
+ input[type="text"] {
147
+ background-color: #ffffff !important;
148
+ color: #333333 !important;
149
+ border-color: #ccc !important;
150
+ }
151
 
152
  /* 单选按钮 */
153
+ .stRadio label,
154
+ .stRadio [data-baseweb="radio"] {
155
+ color: #333333 !important;
156
+ }
157
+ .stRadio p {
158
  color: #333333 !important;
159
  }
160