Skip to content

Commit 8386390

Browse files
committed
fix: iOS 웹페이지 레이아웃 꺠지는 문제 해결
1 parent be4f377 commit 8386390

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<!-- <link rel="icon" href="/favicon.ico" sizes="32x32" /> -->
77
<link rel="icon" href="/favicon.ico" />
88
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
9-
<meta name="viewport" content="width=device-width, initial-scale=1" />
9+
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
1010
<meta name="theme-color" content="#000000" />
1111

1212
<!-- Primary Meta Tags -->

src/pages/MainVer2.scss

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
.main-ver2 .page1-width {
2222
height: 85vh;
23+
height: 85svh; /* iOS Safari safe visual viewport */
24+
height: 85dvh; /* Dynamic viewport (newer Safari/Chromium) */
2325

2426
@include r.media-laptop {
2527
width: 1280px;
@@ -199,7 +201,9 @@
199201
.main-ver2 .page-size {
200202
position: relative;
201203
width: 100%;
202-
height: 100vh;
204+
height: 100vh; /* fallback */
205+
height: 100svh; /* iOS Safari safe visual viewport */
206+
height: 100dvh; /* Dynamic viewport */
203207
@include r.media-tablet {
204208
height: auto;
205209
}
@@ -249,10 +253,12 @@
249253
}
250254

251255
.main-ver2 .page4 {
252-
height: 100vh;
256+
height: 100vh; /* fallback */
257+
height: 100svh; /* iOS Safari safe visual viewport */
258+
height: 100dvh; /* Dynamic viewport */
253259
@include r.media-tablet {
254260
height: calc(534px + 60px);
255-
width: fit;
261+
width: 100%;
256262
}
257263
@include r.media-mobile {
258264
height: calc(351px + 36px);

src/pages/MainVer2Page2.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
flex-direction: column;
4343
justify-content: center;
4444
align-items: center;
45-
width: 100vw;
45+
width: 100%;
4646
}
4747
}
4848

0 commit comments

Comments
 (0)