디바이스별 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,767
13년 전 조회 2,204
13년 전 조회 3,966
13년 전 조회 2,946
13년 전 조회 2,094
13년 전 조회 2,158
13년 전 조회 8,745
13년 전 조회 3,638
13년 전 조회 2,357
13년 전 조회 2,542
13년 전 조회 4,158
13년 전 조회 2,418
13년 전 조회 2.1만
13년 전 조회 4,202
13년 전 조회 4,094
13년 전 조회 6,089
13년 전 조회 3,335
13년 전 조회 2,188
13년 전 조회 2,361
13년 전 조회 1.7만
13년 전 조회 2,172
13년 전 조회 3,419
13년 전 조회 2,977
13년 전 조회 2,639
13년 전 조회 2,529
13년 전 조회 2,692
13년 전 조회 2.5만
13년 전 조회 3,825
13년 전 조회 3만
13년 전 조회 3,556
13년 전 조회 2.4만
13년 전 조회 6,943
13년 전 조회 2,286
13년 전 조회 2,253
13년 전 조회 4,042
13년 전 조회 2,448
13년 전 조회 3,555
13년 전 조회 2,729
13년 전 조회 2,675
13년 전 조회 8,018
13년 전 조회 6,564
13년 전 조회 2,444
13년 전 조회 2,505
13년 전 조회 6,399
13년 전 조회 7,746
13년 전 조회 2,504
13년 전 조회 1,868
13년 전 조회 2,243
13년 전 조회 3,239
13년 전 조회 6,981
13년 전 조회 2,412
13년 전 조회 3,093
13년 전 조회 2,701
13년 전 조회 1,834
13년 전 조회 2,668
13년 전 조회 2,107
13년 전 조회 1,995
13년 전 조회 7,491
13년 전 조회 2,239
13년 전 조회 1,804
13년 전 조회 4,103
13년 전 조회 2,461
13년 전 조회 4,865
13년 전 조회 2,684
13년 전 조회 2,313
13년 전 조회 1,875
13년 전 조회 1,853
13년 전 조회 2,100
13년 전 조회 2,302
13년 전 조회 3,027
13년 전 조회 2,303
13년 전 조회 3,473
13년 전 조회 2,374
13년 전 조회 5,486
13년 전 조회 4,663
13년 전 조회 6,217
13년 전 조회 8,810
13년 전 조회 4,069
13년 전 조회 3,510
13년 전 조회 1,888
13년 전 조회 4,215
13년 전 조회 2,120
13년 전 조회 5,644
13년 전 조회 3,815
13년 전 조회 3,096
13년 전 조회 2,950
13년 전 조회 7,273
13년 전 조회 3,087
13년 전 조회 2,749
13년 전 조회 2,615
13년 전 조회 4,183
13년 전 조회 4,125
13년 전 조회 2,512
13년 전 조회 2,710
13년 전 조회 5,935
13년 전 조회 1,989
13년 전 조회 2,475
13년 전 조회 2,774
13년 전 조회 3,194
13년 전 조회 3,186