디바이스별 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,857
13년 전 조회 2,305
13년 전 조회 4,065
13년 전 조회 3,034
13년 전 조회 2,188
13년 전 조회 2,195
13년 전 조회 8,780
13년 전 조회 3,669
13년 전 조회 2,438
13년 전 조회 2,571
13년 전 조회 4,197
13년 전 조회 2,502
13년 전 조회 2.1만
13년 전 조회 4,241
13년 전 조회 4,170
13년 전 조회 6,124
13년 전 조회 3,425
13년 전 조회 2,275
13년 전 조회 2,453
13년 전 조회 1.7만
13년 전 조회 2,249
13년 전 조회 3,462
13년 전 조회 3,021
13년 전 조회 2,726
13년 전 조회 2,624
13년 전 조회 2,780
13년 전 조회 2.5만
13년 전 조회 3,877
13년 전 조회 3만
13년 전 조회 3,670
13년 전 조회 2.4만
13년 전 조회 6,994
13년 전 조회 2,393
13년 전 조회 2,353
13년 전 조회 4,081
13년 전 조회 2,543
13년 전 조회 3,600
13년 전 조회 2,777
13년 전 조회 2,724
13년 전 조회 8,122
13년 전 조회 6,667
13년 전 조회 2,545
13년 전 조회 2,605
13년 전 조회 6,506
13년 전 조회 7,844
13년 전 조회 2,600
13년 전 조회 1,947
13년 전 조회 2,343
13년 전 조회 3,354
13년 전 조회 7,077
13년 전 조회 2,506
13년 전 조회 3,187
13년 전 조회 2,783
13년 전 조회 1,932
13년 전 조회 2,754
13년 전 조회 2,202
13년 전 조회 2,103
13년 전 조회 7,589
13년 전 조회 2,341
13년 전 조회 1,913
13년 전 조회 4,200
13년 전 조회 2,560
13년 전 조회 4,961
13년 전 조회 2,786
13년 전 조회 2,414
13년 전 조회 1,970
13년 전 조회 1,956
13년 전 조회 2,194
13년 전 조회 2,413
13년 전 조회 3,135
13년 전 조회 2,386
13년 전 조회 3,571
13년 전 조회 2,464
13년 전 조회 5,608
13년 전 조회 4,767
13년 전 조회 6,329
13년 전 조회 8,927
13년 전 조회 4,177
13년 전 조회 3,604
13년 전 조회 1,972
13년 전 조회 4,320
13년 전 조회 2,213
13년 전 조회 5,755
13년 전 조회 3,903
13년 전 조회 3,197
13년 전 조회 3,047
13년 전 조회 7,385
13년 전 조회 3,179
13년 전 조회 2,840
13년 전 조회 2,715
13년 전 조회 4,268
13년 전 조회 4,224
13년 전 조회 2,600
13년 전 조회 2,808
13년 전 조회 6,038
13년 전 조회 2,083
13년 전 조회 2,566
13년 전 조회 2,902
13년 전 조회 3,284
13년 전 조회 3,267