디바이스별 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,243
13년 전 조회 1,685
13년 전 조회 3,444
13년 전 조회 2,410
13년 전 조회 1,577
13년 전 조회 1,712
13년 전 조회 8,293
13년 전 조회 3,191
13년 전 조회 1,897
13년 전 조회 2,105
13년 전 조회 3,772
13년 전 조회 1,956
13년 전 조회 2만
13년 전 조회 3,834
13년 전 조회 3,603
13년 전 조회 5,709
13년 전 조회 2,866
13년 전 조회 1,706
13년 전 조회 1,907
13년 전 조회 1.7만
13년 전 조회 1,655
13년 전 조회 3,016
13년 전 조회 2,576
13년 전 조회 2,167
13년 전 조회 2,047
13년 전 조회 2,196
13년 전 조회 2.4만
13년 전 조회 3,420
13년 전 조회 3만
13년 전 조회 3,116
13년 전 조회 2.3만
13년 전 조회 6,529
13년 전 조회 1,797
13년 전 조회 1,790
13년 전 조회 3,626
13년 전 조회 1,985
13년 전 조회 3,248
13년 전 조회 2,335
13년 전 조회 2,286
13년 전 조회 7,551
13년 전 조회 6,120
13년 전 조회 1,945
13년 전 조회 2,049
13년 전 조회 5,921
13년 전 조회 7,259
13년 전 조회 2,032
13년 전 조회 1,383
13년 전 조회 1,781
13년 전 조회 2,793
13년 전 조회 6,501
13년 전 조회 1,899
13년 전 조회 2,620
13년 전 조회 2,180
13년 전 조회 1,330
13년 전 조회 2,166
13년 전 조회 1,632
13년 전 조회 1,455
13년 전 조회 6,973
13년 전 조회 1,746
13년 전 조회 1,288
13년 전 조회 3,651
13년 전 조회 1,983
13년 전 조회 4,423
13년 전 조회 2,161
13년 전 조회 1,830
13년 전 조회 1,382
13년 전 조회 1,340
13년 전 조회 1,607
13년 전 조회 1,833
13년 전 조회 2,521
13년 전 조회 1,762
13년 전 조회 2,969
13년 전 조회 1,865
13년 전 조회 4,996
13년 전 조회 4,158
13년 전 조회 5,720
13년 전 조회 8,307
13년 전 조회 3,552
13년 전 조회 3,006
13년 전 조회 1,384
13년 전 조회 3,732
13년 전 조회 1,598
13년 전 조회 5,122
13년 전 조회 3,348
13년 전 조회 2,620
13년 전 조회 2,464
13년 전 조회 6,783
13년 전 조회 2,577
13년 전 조회 2,214
13년 전 조회 2,133
13년 전 조회 3,703
13년 전 조회 3,653
13년 전 조회 2,015
13년 전 조회 2,207
13년 전 조회 5,446
13년 전 조회 1,523
13년 전 조회 1,996
13년 전 조회 2,347
13년 전 조회 2,724
13년 전 조회 2,749