Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -194,6 +194,13 @@ COLOR = "#F1F1F1"
|
|
| 194 |
|
| 195 |
st.markdown(f"""
|
| 196 |
<style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 197 |
/* 상단·배경 투명 처리 */
|
| 198 |
header[data-testid="stHeader"],
|
| 199 |
[data-testid="stAppViewContainer"],
|
|
@@ -203,13 +210,29 @@ main, section.main {{ background: transparent !important; }}
|
|
| 203 |
.stApp::before, .stApp::after,
|
| 204 |
.block-container::before, .block-container::after {{ content:none !important; }}
|
| 205 |
|
| 206 |
-
/*
|
| 207 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 208 |
position: relative;
|
| 209 |
-
|
| 210 |
-
background: {COLOR} !important;
|
| 211 |
}}
|
| 212 |
-
.block-container > * {{ position: relative; z-index: 1; }}
|
| 213 |
</style>
|
| 214 |
""", unsafe_allow_html=True)
|
| 215 |
|
|
|
|
| 194 |
|
| 195 |
st.markdown(f"""
|
| 196 |
<style>
|
| 197 |
+
/* 기존 배경/레이어 정리 */
|
| 198 |
+
.stApp {{ background: transparent !important; }}
|
| 199 |
+
.stApp::after, .block-container::before, .block-container::after {{ content: none !important; }}
|
| 200 |
+
|
| 201 |
+
/* 중앙 폭 변수 (페이지 레이아웃에 맞춰 필요시 1000~1200px 튜닝) */
|
| 202 |
+
:root {{ --col-w: min(1200px, 95vw); }}
|
| 203 |
+
|
| 204 |
/* 상단·배경 투명 처리 */
|
| 205 |
header[data-testid="stHeader"],
|
| 206 |
[data-testid="stAppViewContainer"],
|
|
|
|
| 210 |
.stApp::before, .stApp::after,
|
| 211 |
.block-container::before, .block-container::after {{ content:none !important; }}
|
| 212 |
|
| 213 |
+
/* ✅ 단색 배경: '한 장'을 viewport에 고정 → 스크롤해도 안 잘림
|
| 214 |
+
중앙 컬럼 폭만 보이도록 좌우를 clip-path로 잘라냄 */
|
| 215 |
+
.stApp::before {{
|
| 216 |
+
content:"";
|
| 217 |
+
position: fixed;
|
| 218 |
+
inset: 0; /* 풀스크린 */
|
| 219 |
+
background: {COLOR};
|
| 220 |
+
pointer-events: none;
|
| 221 |
+
z-index: 0;
|
| 222 |
+
|
| 223 |
+
/* 가운데 정렬된 컬럼 폭만 남기고 좌우는 가림 */
|
| 224 |
+
clip-path: inset(0 calc((100vw - var(--col-w))/2) 0 calc((100vw - var(--col-w))/2));
|
| 225 |
+
|
| 226 |
+
/* 재합성 이음새 방지 보정 */
|
| 227 |
+
will-change: transform;
|
| 228 |
+
transform: translateZ(0);
|
| 229 |
+
}}
|
| 230 |
+
|
| 231 |
+
/* 실제 콘텐츠는 배경 위로 */
|
| 232 |
+
.block-container, [data-testid="stSidebar"] {{
|
| 233 |
position: relative;
|
| 234 |
+
z-index: 1;
|
|
|
|
| 235 |
}}
|
|
|
|
| 236 |
</style>
|
| 237 |
""", unsafe_allow_html=True)
|
| 238 |
|