디바이스별 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년 전 조회 1,526
13년 전 조회 975
13년 전 조회 2,715
13년 전 조회 1,690
13년 전 조회 848
13년 전 조회 1,092
13년 전 조회 7,659
13년 전 조회 2,585
13년 전 조회 1,122
13년 전 조회 1,492
13년 전 조회 3,059
13년 전 조회 1,224
13년 전 조회 2만
13년 전 조회 3,129
13년 전 조회 2,849
13년 전 조회 5,013
13년 전 조회 2,131
13년 전 조회 1,007
13년 전 조회 1,179
13년 전 조회 1.6만
13년 전 조회 969
13년 전 조회 2,392
13년 전 조회 1,945
13년 전 조회 1,483
13년 전 조회 1,358
13년 전 조회 1,489
13년 전 조회 2.4만
13년 전 조회 2,817
13년 전 조회 2.9만
13년 전 조회 2,397
13년 전 조회 2.3만
13년 전 조회 5,926
13년 전 조회 1,128
13년 전 조회 1,121
13년 전 조회 2,997
13년 전 조회 1,280
13년 전 조회 2,510
13년 전 조회 1,703
13년 전 조회 1,691
13년 전 조회 6,843
13년 전 조회 5,389
13년 전 조회 1,254
13년 전 조회 1,393
13년 전 조회 5,238
13년 전 조회 6,605
13년 전 조회 1,382
13년 전 조회 713
13년 전 조회 1,093
13년 전 조회 2,071
13년 전 조회 5,798
13년 전 조회 1,229
13년 전 조회 1,899
13년 전 조회 1,499
13년 전 조회 676
13년 전 조회 1,502
13년 전 조회 957
13년 전 조회 808
13년 전 조회 6,320
13년 전 조회 1,058
13년 전 조회 628
13년 전 조회 2,976
13년 전 조회 1,365
13년 전 조회 3,728
13년 전 조회 1,560
13년 전 조회 1,231
13년 전 조회 766
13년 전 조회 757
13년 전 조회 1,002
13년 전 조회 1,199
13년 전 조회 1,918
13년 전 조회 1,202
13년 전 조회 2,334
13년 전 조회 1,272
13년 전 조회 4,384
13년 전 조회 3,547
13년 전 조회 5,124
13년 전 조회 7,713
13년 전 조회 2,957
13년 전 조회 2,403
13년 전 조회 818
13년 전 조회 3,134
13년 전 조회 1,023
13년 전 조회 4,516
13년 전 조회 2,652
13년 전 조회 2,027
13년 전 조회 1,802
13년 전 조회 6,133
13년 전 조회 1,937
13년 전 조회 1,607
13년 전 조회 1,492
13년 전 조회 3,017
13년 전 조회 3,022
13년 전 조회 1,349
13년 전 조회 1,556
13년 전 조회 4,789
13년 전 조회 866
13년 전 조회 1,336
13년 전 조회 1,659
13년 전 조회 2,056
13년 전 조회 2,089