디바이스별 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,749
13년 전 조회 2,189
13년 전 조회 3,949
13년 전 조회 2,931
13년 전 조회 2,083
13년 전 조회 2,155
13년 전 조회 8,743
13년 전 조회 3,634
13년 전 조회 2,350
13년 전 조회 2,540
13년 전 조회 4,155
13년 전 조회 2,407
13년 전 조회 2.1만
13년 전 조회 4,200
13년 전 조회 4,078
13년 전 조회 6,087
13년 전 조회 3,329
13년 전 조회 2,178
13년 전 조회 2,353
13년 전 조회 1.7만
13년 전 조회 2,162
13년 전 조회 3,417
13년 전 조회 2,973
13년 전 조회 2,626
13년 전 조회 2,519
13년 전 조회 2,679
13년 전 조회 2.5만
13년 전 조회 3,821
13년 전 조회 3만
13년 전 조회 3,543
13년 전 조회 2.4만
13년 전 조회 6,940
13년 전 조회 2,275
13년 전 조회 2,246
13년 전 조회 4,038
13년 전 조회 2,434
13년 전 조회 3,553
13년 전 조회 2,724
13년 전 조회 2,675
13년 전 조회 8,004
13년 전 조회 6,555
13년 전 조회 2,434
13년 전 조회 2,501
13년 전 조회 6,387
13년 전 조회 7,731
13년 전 조회 2,487
13년 전 조회 1,856
13년 전 조회 2,231
13년 전 조회 3,225
13년 전 조회 6,969
13년 전 조회 2,399
13년 전 조회 3,083
13년 전 조회 2,687
13년 전 조회 1,823
13년 전 조회 2,656
13년 전 조회 2,092
13년 전 조회 1,985
13년 전 조회 7,473
13년 전 조회 2,224
13년 전 조회 1,792
13년 전 조회 4,094
13년 전 조회 2,451
13년 전 조회 4,852
13년 전 조회 2,670
13년 전 조회 2,301
13년 전 조회 1,865
13년 전 조회 1,832
13년 전 조회 2,088
13년 전 조회 2,290
13년 전 조회 3,012
13년 전 조회 2,290
13년 전 조회 3,459
13년 전 조회 2,361
13년 전 조회 5,470
13년 전 조회 4,648
13년 전 조회 6,207
13년 전 조회 8,797
13년 전 조회 4,052
13년 전 조회 3,495
13년 전 조회 1,871
13년 전 조회 4,203
13년 전 조회 2,098
13년 전 조회 5,632
13년 전 조회 3,796
13년 전 조회 3,084
13년 전 조회 2,935
13년 전 조회 7,258
13년 전 조회 3,066
13년 전 조회 2,736
13년 전 조회 2,601
13년 전 조회 4,169
13년 전 조회 4,112
13년 전 조회 2,497
13년 전 조회 2,696
13년 전 조회 5,921
13년 전 조회 1,979
13년 전 조회 2,459
13년 전 조회 2,758
13년 전 조회 3,177
13년 전 조회 3,171