디바이스별 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,926
13년 전 조회 2,377
13년 전 조회 4,144
13년 전 조회 3,108
13년 전 조회 2,245
13년 전 조회 2,212
13년 전 조회 8,803
13년 전 조회 3,688
13년 전 조회 2,519
13년 전 조회 2,585
13년 전 조회 4,227
13년 전 조회 2,569
13년 전 조회 2.1만
13년 전 조회 4,273
13년 전 조회 4,238
13년 전 조회 6,147
13년 전 조회 3,506
13년 전 조회 2,361
13년 전 조회 2,523
13년 전 조회 1.7만
13년 전 조회 2,325
13년 전 조회 3,484
13년 전 조회 3,033
13년 전 조회 2,781
13년 전 조회 2,700
13년 전 조회 2,857
13년 전 조회 2.5만
13년 전 조회 3,897
13년 전 조회 3만
13년 전 조회 3,746
13년 전 조회 2.4만
13년 전 조회 7,006
13년 전 조회 2,462
13년 전 조회 2,424
13년 전 조회 4,097
13년 전 조회 2,614
13년 전 조회 3,626
13년 전 조회 2,799
13년 전 조회 2,739
13년 전 조회 8,185
13년 전 조회 6,750
13년 전 조회 2,617
13년 전 조회 2,693
13년 전 조회 6,583
13년 전 조회 7,914
13년 전 조회 2,670
13년 전 조회 2,022
13년 전 조회 2,414
13년 전 조회 3,452
13년 전 조회 7,153
13년 전 조회 2,576
13년 전 조회 3,266
13년 전 조회 2,863
13년 전 조회 1,995
13년 전 조회 2,836
13년 전 조회 2,274
13년 전 조회 2,167
13년 전 조회 7,664
13년 전 조회 2,414
13년 전 조회 1,990
13년 전 조회 4,280
13년 전 조회 2,632
13년 전 조회 5,041
13년 전 조회 2,860
13년 전 조회 2,487
13년 전 조회 2,037
13년 전 조회 2,037
13년 전 조회 2,274
13년 전 조회 2,484
13년 전 조회 3,196
13년 전 조회 2,456
13년 전 조회 3,654
13년 전 조회 2,534
13년 전 조회 5,695
13년 전 조회 4,850
13년 전 조회 6,411
13년 전 조회 8,999
13년 전 조회 4,250
13년 전 조회 3,685
13년 전 조회 2,048
13년 전 조회 4,392
13년 전 조회 2,274
13년 전 조회 5,819
13년 전 조회 3,979
13년 전 조회 3,249
13년 전 조회 3,108
13년 전 조회 7,448
13년 전 조회 3,242
13년 전 조회 2,899
13년 전 조회 2,772
13년 전 조회 4,338
13년 전 조회 4,286
13년 전 조회 2,654
13년 전 조회 2,875
13년 전 조회 6,100
13년 전 조회 2,140
13년 전 조회 2,632
13년 전 조회 2,965
13년 전 조회 3,360
13년 전 조회 3,335