디바이스별 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,441
13년 전 조회 1,875
13년 전 조회 3,639
13년 전 조회 2,628
13년 전 조회 1,764
13년 전 조회 1,803
13년 전 조회 8,382
13년 전 조회 3,300
13년 전 조회 2,077
13년 전 조회 2,191
13년 전 조회 3,850
13년 전 조회 2,139
13년 전 조회 2만
13년 전 조회 3,908
13년 전 조회 3,805
13년 전 조회 5,804
13년 전 조회 3,082
13년 전 조회 1,903
13년 전 조회 2,111
13년 전 조회 1.7만
13년 전 조회 1,889
13년 전 조회 3,102
13년 전 조회 2,675
13년 전 조회 2,367
13년 전 조회 2,242
13년 전 조회 2,393
13년 전 조회 2.4만
13년 전 조회 3,531
13년 전 조회 3만
13년 전 조회 3,304
13년 전 조회 2.4만
13년 전 조회 6,629
13년 전 조회 2,010
13년 전 조회 2,001
13년 전 조회 3,729
13년 전 조회 2,188
13년 전 조회 3,307
13년 전 조회 2,433
13년 전 조회 2,386
13년 전 조회 7,760
13년 전 조회 6,343
13년 전 조회 2,149
13년 전 조회 2,248
13년 전 조회 6,106
13년 전 조회 7,446
13년 전 조회 2,224
13년 전 조회 1,582
13년 전 조회 1,975
13년 전 조회 3,011
13년 전 조회 6,689
13년 전 조회 2,103
13년 전 조회 2,812
13년 전 조회 2,393
13년 전 조회 1,534
13년 전 조회 2,375
13년 전 조회 1,821
13년 전 조회 1,679
13년 전 조회 7,184
13년 전 조회 1,955
13년 전 조회 1,489
13년 전 조회 3,845
13년 전 조회 2,184
13년 전 조회 4,587
13년 전 조회 2,357
13년 전 조회 2,033
13년 전 조회 1,578
13년 전 조회 1,569
13년 전 조회 1,820
13년 전 조회 2,029
13년 전 조회 2,717
13년 전 조회 1,994
13년 전 조회 3,171
13년 전 조회 2,061
13년 전 조회 5,204
13년 전 조회 4,369
13년 전 조회 5,910
13년 전 조회 8,506
13년 전 조회 3,768
13년 전 조회 3,220
13년 전 조회 1,607
13년 전 조회 3,928
13년 전 조회 1,804
13년 전 조회 5,332
13년 전 조회 3,503
13년 전 조회 2,802
13년 전 조회 2,636
13년 전 조회 6,980
13년 전 조회 2,799
13년 전 조회 2,443
13년 전 조회 2,325
13년 전 조회 3,896
13년 전 조회 3,850
13년 전 조회 2,221
13년 전 조회 2,402
13년 전 조회 5,647
13년 전 조회 1,722
13년 전 조회 2,182
13년 전 조회 2,529
13년 전 조회 2,922
13년 전 조회 2,937