chengwang96 commited on
Commit
54acf57
·
1 Parent(s): 3f31363

update css

Browse files
Files changed (1) hide show
  1. app.py +22 -9
app.py CHANGED
@@ -187,7 +187,7 @@ css = """
187
  /* 让图片和标签容器固定宽度 300px,并紧贴无缝 */
188
  .image-label-container {
189
  width: 300px;
190
- margin: 0 auto;
191
  display: block;
192
  position: relative;
193
  text-align: center;
@@ -195,16 +195,24 @@ css = """
195
  border: none !important;
196
  }
197
 
 
198
  .image-label-container .gr-image,
199
  .image-label-container .gr-image-preview,
 
 
 
 
 
 
 
 
 
 
 
 
200
  .image-label-container img {
201
- width: 300px !important;
202
- height: 300px !important;
203
  margin: 0 !important;
204
  padding: 0 !important;
205
- border-radius: 10px 10px 0 0 !important;
206
- background: #fff !important;
207
- box-shadow: 0 2px 12px 0 rgba(60,64,67,.08);
208
  display: block !important;
209
  vertical-align: bottom !important;
210
  }
@@ -213,7 +221,6 @@ css = """
213
  width: 300px;
214
  text-align: center !important;
215
  display: block;
216
- margin: 0 !important;
217
  background: rgb(76, 180, 184);
218
  color: #fff;
219
  padding: 6px 0;
@@ -223,11 +230,17 @@ css = """
223
  font-weight: normal;
224
  }
225
 
226
- .image-label-container .gr-image .gr-image-img,
227
- .image-label-container .gr-image-preview .gr-image-img,
 
228
  .image-label-container img {
 
 
229
  margin: 0 !important;
230
  padding: 0 !important;
 
 
 
231
  display: block !important;
232
  vertical-align: bottom !important;
233
  }
 
187
  /* 让图片和标签容器固定宽度 300px,并紧贴无缝 */
188
  .image-label-container {
189
  width: 300px;
190
+ margin: 0 auto !important;
191
  display: block;
192
  position: relative;
193
  text-align: center;
 
195
  border: none !important;
196
  }
197
 
198
+ /* >>>>>> 关键:消除图片和下方label的所有间隔 <<<<<< */
199
  .image-label-container .gr-image,
200
  .image-label-container .gr-image-preview,
201
+ .image-label-container img,
202
+ .image-label-container .img-label-bar {
203
+ margin-bottom: 0 !important;
204
+ margin-top: 0 !important;
205
+ padding-bottom: 0 !important;
206
+ padding-top: 0 !important;
207
+ display: block !important;
208
+ vertical-align: bottom !important;
209
+ }
210
+
211
+ .image-label-container .gr-image .gr-image-img,
212
+ .image-label-container .gr-image-preview .gr-image-img,
213
  .image-label-container img {
 
 
214
  margin: 0 !important;
215
  padding: 0 !important;
 
 
 
216
  display: block !important;
217
  vertical-align: bottom !important;
218
  }
 
221
  width: 300px;
222
  text-align: center !important;
223
  display: block;
 
224
  background: rgb(76, 180, 184);
225
  color: #fff;
226
  padding: 6px 0;
 
230
  font-weight: normal;
231
  }
232
 
233
+ /* 图片也圆角,label贴合图片 */
234
+ .image-label-container .gr-image,
235
+ .image-label-container .gr-image-preview,
236
  .image-label-container img {
237
+ width: 300px !important;
238
+ height: 300px !important;
239
  margin: 0 !important;
240
  padding: 0 !important;
241
+ border-radius: 10px 10px 0 0 !important;
242
+ background: #fff !important;
243
+ box-shadow: 0 2px 12px 0 rgba(60,64,67,.08);
244
  display: block !important;
245
  vertical-align: bottom !important;
246
  }