Lashtw commited on
Commit
76be3b0
·
verified ·
1 Parent(s): c95c462

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -16
app.py CHANGED
@@ -86,10 +86,7 @@ st.markdown("""
86
  font-size: 1rem;
87
  text-align: center;
88
  color: #333;
89
- line-height: 1.5; /* 控制行距以實現換行效果 */
90
- }
91
- .podium-label div {
92
- margin-bottom: 3px; /* 姓名和幸運號碼之間的間距 */
93
  }
94
  </style>
95
  """, unsafe_allow_html=True)
@@ -320,10 +317,7 @@ def main():
320
  podium_html += f'''
321
  <div class="podium">
322
  <div class="podium-step second">{int(second['查詢結果'])}</div>
323
- <div class="podium-label">
324
- <div>{second['姓名']}</div>
325
- <div>{second['幸運號碼']}</div>
326
- </div>
327
  </div>
328
  '''
329
  else:
@@ -335,10 +329,7 @@ def main():
335
  podium_html += f'''
336
  <div class="podium">
337
  <div class="podium-step first">{int(first['查詢結果'])}</div>
338
- <div class="podium-label">
339
- <div>{first['姓名']}</div>
340
- <div>{first['幸運號碼']}</div>
341
- </div>
342
  </div>
343
  '''
344
  else:
@@ -350,10 +341,7 @@ def main():
350
  podium_html += f'''
351
  <div class="podium">
352
  <div class="podium-step third">{int(third['查詢結果'])}</div>
353
- <div class="podium-label">
354
- <div>{third['姓名']}</div>
355
- <div>{third['幸運號碼']}</div>
356
- </div>
357
  </div>
358
  '''
359
  else:
 
86
  font-size: 1rem;
87
  text-align: center;
88
  color: #333;
89
+ white-space: pre-line; /* 允許換行 */
 
 
 
90
  }
91
  </style>
92
  """, unsafe_allow_html=True)
 
317
  podium_html += f'''
318
  <div class="podium">
319
  <div class="podium-step second">{int(second['查詢結果'])}</div>
320
+ <div class="podium-label">{second['姓名']}\n{second['幸運號碼']}</div>
 
 
 
321
  </div>
322
  '''
323
  else:
 
329
  podium_html += f'''
330
  <div class="podium">
331
  <div class="podium-step first">{int(first['查詢結果'])}</div>
332
+ <div class="podium-label">{first['姓名']}\n{first['幸運號碼']}</div>
 
 
 
333
  </div>
334
  '''
335
  else:
 
341
  podium_html += f'''
342
  <div class="podium">
343
  <div class="podium-step third">{int(third['查詢結果'])}</div>
344
+ <div class="podium-label">{third['姓名']}\n{third['幸運號碼']}</div>
 
 
 
345
  </div>
346
  '''
347
  else: