디바이스별 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,801
13년 전 조회 2,238
13년 전 조회 3,996
13년 전 조회 2,987
13년 전 조회 2,135
13년 전 조회 2,166
13년 전 조회 8,764
13년 전 조회 3,650
13년 전 조회 2,387
13년 전 조회 2,554
13년 전 조회 4,174
13년 전 조회 2,453
13년 전 조회 2.1만
13년 전 조회 4,222
13년 전 조회 4,125
13년 전 조회 6,101
13년 전 조회 3,371
13년 전 조회 2,218
13년 전 조회 2,397
13년 전 조회 1.7만
13년 전 조회 2,204
13년 전 조회 3,436
13년 전 조회 2,991
13년 전 조회 2,673
13년 전 조회 2,566
13년 전 조회 2,724
13년 전 조회 2.5만
13년 전 조회 3,845
13년 전 조회 3만
13년 전 조회 3,595
13년 전 조회 2.4만
13년 전 조회 6,959
13년 전 조회 2,314
13년 전 조회 2,284
13년 전 조회 4,054
13년 전 조회 2,476
13년 전 조회 3,572
13년 전 조회 2,747
13년 전 조회 2,688
13년 전 조회 8,052
13년 전 조회 6,606
13년 전 조회 2,473
13년 전 조회 2,543
13년 전 조회 6,431
13년 전 조회 7,778
13년 전 조회 2,533
13년 전 조회 1,889
13년 전 조회 2,277
13년 전 조회 3,275
13년 전 조회 7,011
13년 전 조회 2,446
13년 전 조회 3,127
13년 전 조회 2,727
13년 전 조회 1,866
13년 전 조회 2,692
13년 전 조회 2,140
13년 전 조회 2,025
13년 전 조회 7,516
13년 전 조회 2,278
13년 전 조회 1,837
13년 전 조회 4,135
13년 전 조회 2,492
13년 전 조회 4,891
13년 전 조회 2,711
13년 전 조회 2,345
13년 전 조회 1,903
13년 전 조회 1,888
13년 전 조회 2,125
13년 전 조회 2,336
13년 전 조회 3,057
13년 전 조회 2,338
13년 전 조회 3,503
13년 전 조회 2,400
13년 전 조회 5,523
13년 전 조회 4,689
13년 전 조회 6,246
13년 전 조회 8,853
13년 전 조회 4,101
13년 전 조회 3,538
13년 전 조회 1,916
13년 전 조회 4,248
13년 전 조회 2,146
13년 전 조회 5,684
13년 전 조회 3,847
13년 전 조회 3,130
13년 전 조회 2,982
13년 전 조회 7,315
13년 전 조회 3,117
13년 전 조회 2,776
13년 전 조회 2,641
13년 전 조회 4,214
13년 전 조회 4,158
13년 전 조회 2,537
13년 전 조회 2,745
13년 전 조회 5,976
13년 전 조회 2,021
13년 전 조회 2,506
13년 전 조회 2,819
13년 전 조회 3,223
13년 전 조회 3,207