디바이스별 viewport 설정.

 
참고하세요.
 
<?php if(strpos($_SERVER['HTTP_USER_AGENT'],"iPhone")){?>
  <meta name="viewport" content="width=device-width, initial-scale=0.67, maximum-scale=0.67, minimum-scale=0.67, user-scalable=no, target-densitydpi=medium-dpi" />
 <?php }else if(strpos($_SERVER['HTTP_USER_AGENT'],"iPad")){?>
  <meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, width=device-width" />
 <?php }else if(strpos($_SERVER['HTTP_USER_AGENT'],"Android 2")){?>
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=yes, target-densitydpi=device-dpi" />
 <?php }else if(strpos($_SERVER['HTTP_USER_AGENT'],"Android")){?>
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=yes, target-densitydpi=device-dpi" />
 <?php }else if(strpos($_SERVER['HTTP_USER_AGENT'],"Opera Mini")){?>
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi" />
 <?php }else if(strpos($_SERVER['HTTP_USER_AGENT'],"Opera 9")){?>
  <meta name="viewport" content="initial-scale=0.75, maximum-scale=0.75, minimum-scale=0.75, user-scalable=no" />
 <?php }else if(strpos($_SERVER['HTTP_USER_AGENT'],"MSIE")){?>
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi" />
 <?php }else if(strpos($_SERVER['HTTP_USER_AGENT'],"FROYO")){?>
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi" />
 <?php }?>
 
 
|

댓글 5개

좋네요 굿뜨!
오 좋네요. 이거 바로 써먹을수 있을것 같네요.
골머리 썩고 있었는데,
이 문서 때문에 힌트 얻어 작업 마무리가 잘 되었습니다.
감사합니다!!
감사합니다!!
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
13년 전 조회 2,702
13년 전 조회 2,135
13년 전 조회 3,899
13년 전 조회 2,885
13년 전 조회 2,034
13년 전 조회 2,151
13년 전 조회 8,732
13년 전 조회 3,620
13년 전 조회 2,301
13년 전 조회 2,526
13년 전 조회 4,145
13년 전 조회 2,363
13년 전 조회 2.1만
13년 전 조회 4,192
13년 전 조회 4,029
13년 전 조회 6,076
13년 전 조회 3,284
13년 전 조회 2,134
13년 전 조회 2,310
13년 전 조회 1.7만
13년 전 조회 2,124
13년 전 조회 3,407
13년 전 조회 2,963
13년 전 조회 2,591
13년 전 조회 2,471
13년 전 조회 2,633
13년 전 조회 2.5만
13년 전 조회 3,817
13년 전 조회 3만
13년 전 조회 3,493
13년 전 조회 2.4만
13년 전 조회 6,928
13년 전 조회 2,231
13년 전 조회 2,212
13년 전 조회 4,025
13년 전 조회 2,384
13년 전 조회 3,544
13년 전 조회 2,716
13년 전 조회 2,664
13년 전 조회 7,948
13년 전 조회 6,520
13년 전 조회 2,384
13년 전 조회 2,454
13년 전 조회 6,332
13년 전 조회 7,677
13년 전 조회 2,443
13년 전 조회 1,806
13년 전 조회 2,189
13년 전 조회 3,187
13년 전 조회 6,907
13년 전 조회 2,341
13년 전 조회 3,039
13년 전 조회 2,625
13년 전 조회 1,776
13년 전 조회 2,601
13년 전 조회 2,047
13년 전 조회 1,940
13년 전 조회 7,419
13년 전 조회 2,177
13년 전 조회 1,727
13년 전 조회 4,055
13년 전 조회 2,406
13년 전 조회 4,793
13년 전 조회 2,620
13년 전 조회 2,263
13년 전 조회 1,823
13년 전 조회 1,789
13년 전 조회 2,039
13년 전 조회 2,247
13년 전 조회 2,973
13년 전 조회 2,234
13년 전 조회 3,408
13년 전 조회 2,316
13년 전 조회 5,424
13년 전 조회 4,602
13년 전 조회 6,161
13년 전 조회 8,748
13년 전 조회 3,998
13년 전 조회 3,441
13년 전 조회 1,835
13년 전 조회 4,152
13년 전 조회 2,037
13년 전 조회 5,558
13년 전 조회 3,741
13년 전 조회 3,027
13년 전 조회 2,884
13년 전 조회 7,204
13년 전 조회 3,020
13년 전 조회 2,685
13년 전 조회 2,552
13년 전 조회 4,123
13년 전 조회 4,074
13년 전 조회 2,446
13년 전 조회 2,645
13년 전 조회 5,879
13년 전 조회 1,937
13년 전 조회 2,403
13년 전 조회 2,715
13년 전 조회 3,135
13년 전 조회 3,130