Update app.py
Browse files
app.py
CHANGED
|
@@ -8,6 +8,7 @@ import qrcode
|
|
| 8 |
from PIL import Image
|
| 9 |
import io
|
| 10 |
|
|
|
|
| 11 |
# 自訂 CSS 確保標題不換行、調整圖片大小、優化按鈕布局、右下角資訊並添加頒獎台樣式
|
| 12 |
st.markdown("""
|
| 13 |
<style>
|
|
@@ -62,19 +63,22 @@ st.markdown("""
|
|
| 62 |
text-align: center;
|
| 63 |
font-weight: bold;
|
| 64 |
color: #333;
|
|
|
|
|
|
|
|
|
|
| 65 |
}
|
| 66 |
.podium-step.first {
|
| 67 |
-
width:
|
| 68 |
height: 150px; /* 第一名台子最高 */
|
| 69 |
background-color: #ffd700; /* 金色 */
|
| 70 |
}
|
| 71 |
.podium-step.second {
|
| 72 |
-
width:
|
| 73 |
height: 120px; /* 第二名次之 */
|
| 74 |
background-color: #c0c0c0; /* 銀色 */
|
| 75 |
}
|
| 76 |
.podium-step.third {
|
| 77 |
-
width:
|
| 78 |
height: 90px; /* 第三名最低 */
|
| 79 |
background-color: #cd7f32; /* 銅色 */
|
| 80 |
}
|
|
@@ -83,6 +87,10 @@ st.markdown("""
|
|
| 83 |
font-size: 1rem;
|
| 84 |
text-align: center;
|
| 85 |
color: #333;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
}
|
| 87 |
</style>
|
| 88 |
""", unsafe_allow_html=True)
|
|
|
|
| 8 |
from PIL import Image
|
| 9 |
import io
|
| 10 |
|
| 11 |
+
# 自訂 CSS 確保標題不換行、調整圖片大小、優化按鈕布局、右下角資訊並添加頒獎台樣式
|
| 12 |
# 自訂 CSS 確保標題不換行、調整圖片大小、優化按鈕布局、右下角資訊並添加頒獎台樣式
|
| 13 |
st.markdown("""
|
| 14 |
<style>
|
|
|
|
| 63 |
text-align: center;
|
| 64 |
font-weight: bold;
|
| 65 |
color: #333;
|
| 66 |
+
display: flex;
|
| 67 |
+
align-items: center;
|
| 68 |
+
justify-content: center;
|
| 69 |
}
|
| 70 |
.podium-step.first {
|
| 71 |
+
width: 120px;
|
| 72 |
height: 150px; /* 第一名台子最高 */
|
| 73 |
background-color: #ffd700; /* 金色 */
|
| 74 |
}
|
| 75 |
.podium-step.second {
|
| 76 |
+
width: 120px;
|
| 77 |
height: 120px; /* 第二名次之 */
|
| 78 |
background-color: #c0c0c0; /* 銀色 */
|
| 79 |
}
|
| 80 |
.podium-step.third {
|
| 81 |
+
width: 120px;
|
| 82 |
height: 90px; /* 第三名最低 */
|
| 83 |
background-color: #cd7f32; /* 銅色 */
|
| 84 |
}
|
|
|
|
| 87 |
font-size: 1rem;
|
| 88 |
text-align: center;
|
| 89 |
color: #333;
|
| 90 |
+
line-height: 1.5; /* 控制行距以實現換行效果 */
|
| 91 |
+
}
|
| 92 |
+
.podium-label div {
|
| 93 |
+
margin-bottom: 3px; /* 姓名和幸運號碼之間的間距 */
|
| 94 |
}
|
| 95 |
</style>
|
| 96 |
""", unsafe_allow_html=True)
|