File tree Expand file tree Collapse file tree 3 files changed +49
-1
lines changed Expand file tree Collapse file tree 3 files changed +49
-1
lines changed Original file line number Diff line number Diff line change 231
231
}
232
232
}
233
233
234
+ /* iOS Safari 특화 스타일 */
235
+ @supports (-webkit-touch-callout : none) {
236
+ .motion-gpu {
237
+ -webkit-transform : translate3d (0 , 0 , 0 );
238
+ transform : translate3d (0 , 0 , 0 );
239
+ -webkit-backface-visibility : hidden;
240
+ backface-visibility : hidden;
241
+ -webkit-perspective : 1000 ;
242
+ perspective : 1000 ;
243
+ }
244
+
245
+ body {
246
+ -webkit-overflow-scrolling : touch;
247
+ }
248
+
249
+ /* iOS에서 애니메이션 시간 추가 단축 */
250
+ [class *= "animate-" ],
251
+ [class *= "motion-" ] {
252
+ transition-duration : 0.1s !important ;
253
+ animation-duration : 0.1s !important ;
254
+ }
255
+ }
256
+
234
257
/* 사용자가 애니메이션 축소 선호 설정을 켠 경우 */
235
258
@media (prefers-reduced-motion : reduce) {
236
259
* {
Original file line number Diff line number Diff line change @@ -56,6 +56,25 @@ export default async function RootLayout({
56
56
57
57
return (
58
58
< html lang = "ko" suppressHydrationWarning >
59
+ < head >
60
+ < script
61
+ dangerouslySetInnerHTML = { {
62
+ __html : `
63
+ // iOS Safari 깜빡임 방지를 위한 즉시 실행 스크립트
64
+ (function() {
65
+ if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {
66
+ document.documentElement.style.opacity = '0.99';
67
+ window.addEventListener('load', function() {
68
+ setTimeout(function() {
69
+ document.documentElement.style.opacity = '1';
70
+ }, 100);
71
+ });
72
+ }
73
+ })();
74
+ ` ,
75
+ } }
76
+ />
77
+ </ head >
59
78
< body
60
79
className = { `${ geistSans . variable } ${ geistMono . variable } ${ inter . variable } ${ notoSansKr . variable } antialiased transition-all` }
61
80
>
Original file line number Diff line number Diff line change @@ -12,10 +12,16 @@ export default function PageLoader() {
12
12
// 초기 로딩 처리
13
13
useEffect ( ( ) => {
14
14
setLoading ( true ) ;
15
+
16
+ // iOS Safari 감지
17
+ const isIOS = / i P h o n e | i P a d | i P o d / i. test (
18
+ typeof navigator !== 'undefined' ? navigator . userAgent : ''
19
+ ) ;
20
+
15
21
const timer = setTimeout ( ( ) => {
16
22
setLoading ( false ) ;
17
23
setFirstRender ( false ) ;
18
- } , 600 ) ; // 600ms 정도의 로딩 시간
24
+ } , isIOS ? 300 : 600 ) ; // iOS에서는 로딩 시간 단축
19
25
20
26
return ( ) => clearTimeout ( timer ) ;
21
27
} , [ pathname ] ) ;
You can’t perform that action at this time.
0 commit comments