디바이스별 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,928
13년 전 조회 2,387
13년 전 조회 4,146
13년 전 조회 3,114
13년 전 조회 2,252
13년 전 조회 2,212
13년 전 조회 8,806
13년 전 조회 3,690
13년 전 조회 2,523
13년 전 조회 2,587
13년 전 조회 4,228
13년 전 조회 2,574
13년 전 조회 2.1만
13년 전 조회 4,273
13년 전 조회 4,239
13년 전 조회 6,149
13년 전 조회 3,510
13년 전 조회 2,361
13년 전 조회 2,529
13년 전 조회 1.7만
13년 전 조회 2,328
13년 전 조회 3,484
13년 전 조회 3,034
13년 전 조회 2,788
13년 전 조회 2,701
13년 전 조회 2,858
13년 전 조회 2.5만
13년 전 조회 3,898
13년 전 조회 3만
13년 전 조회 3,751
13년 전 조회 2.4만
13년 전 조회 7,010
13년 전 조회 2,466
13년 전 조회 2,426
13년 전 조회 4,098
13년 전 조회 2,620
13년 전 조회 3,630
13년 전 조회 2,802
13년 전 조회 2,740
13년 전 조회 8,190
13년 전 조회 6,752
13년 전 조회 2,619
13년 전 조회 2,698
13년 전 조회 6,585
13년 전 조회 7,917
13년 전 조회 2,673
13년 전 조회 2,024
13년 전 조회 2,418
13년 전 조회 3,457
13년 전 조회 7,160
13년 전 조회 2,583
13년 전 조회 3,272
13년 전 조회 2,867
13년 전 조회 2,005
13년 전 조회 2,837
13년 전 조회 2,278
13년 전 조회 2,174
13년 전 조회 7,666
13년 전 조회 2,416
13년 전 조회 1,997
13년 전 조회 4,281
13년 전 조회 2,635
13년 전 조회 5,046
13년 전 조회 2,866
13년 전 조회 2,488
13년 전 조회 2,045
13년 전 조회 2,042
13년 전 조회 2,276
13년 전 조회 2,484
13년 전 조회 3,198
13년 전 조회 2,463
13년 전 조회 3,655
13년 전 조회 2,540
13년 전 조회 5,699
13년 전 조회 4,858
13년 전 조회 6,415
13년 전 조회 9,000
13년 전 조회 4,256
13년 전 조회 3,685
13년 전 조회 2,052
13년 전 조회 4,398
13년 전 조회 2,275
13년 전 조회 5,822
13년 전 조회 3,985
13년 전 조회 3,254
13년 전 조회 3,113
13년 전 조회 7,450
13년 전 조회 3,246
13년 전 조회 2,902
13년 전 조회 2,777
13년 전 조회 4,345
13년 전 조회 4,287
13년 전 조회 2,658
13년 전 조회 2,881
13년 전 조회 6,104
13년 전 조회 2,144
13년 전 조회 2,637
13년 전 조회 2,972
13년 전 조회 3,361
13년 전 조회 3,336