디바이스별 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,789
13년 전 조회 2,221
13년 전 조회 3,981
13년 전 조회 2,971
13년 전 조회 2,111
13년 전 조회 2,161
13년 전 조회 8,753
13년 전 조회 3,645
13년 전 조회 2,377
13년 전 조회 2,547
13년 전 조회 4,168
13년 전 조회 2,439
13년 전 조회 2.1만
13년 전 조회 4,212
13년 전 조회 4,110
13년 전 조회 6,094
13년 전 조회 3,355
13년 전 조회 2,211
13년 전 조회 2,379
13년 전 조회 1.7만
13년 전 조회 2,195
13년 전 조회 3,428
13년 전 조회 2,986
13년 전 조회 2,660
13년 전 조회 2,552
13년 전 조회 2,710
13년 전 조회 2.5만
13년 전 조회 3,836
13년 전 조회 3만
13년 전 조회 3,584
13년 전 조회 2.4만
13년 전 조회 6,952
13년 전 조회 2,303
13년 전 조회 2,269
13년 전 조회 4,050
13년 전 조회 2,464
13년 전 조회 3,566
13년 전 조회 2,739
13년 전 조회 2,680
13년 전 조회 8,042
13년 전 조회 6,588
13년 전 조회 2,460
13년 전 조회 2,524
13년 전 조회 6,420
13년 전 조회 7,762
13년 전 조회 2,521
13년 전 조회 1,879
13년 전 조회 2,261
13년 전 조회 3,259
13년 전 조회 6,997
13년 전 조회 2,429
13년 전 조회 3,114
13년 전 조회 2,715
13년 전 조회 1,853
13년 전 조회 2,684
13년 전 조회 2,128
13년 전 조회 2,012
13년 전 조회 7,503
13년 전 조회 2,261
13년 전 조회 1,821
13년 전 조회 4,125
13년 전 조회 2,485
13년 전 조회 4,882
13년 전 조회 2,702
13년 전 조회 2,334
13년 전 조회 1,893
13년 전 조회 1,875
13년 전 조회 2,117
13년 전 조회 2,326
13년 전 조회 3,040
13년 전 조회 2,323
13년 전 조회 3,489
13년 전 조회 2,387
13년 전 조회 5,513
13년 전 조회 4,679
13년 전 조회 6,230
13년 전 조회 8,829
13년 전 조회 4,091
13년 전 조회 3,528
13년 전 조회 1,902
13년 전 조회 4,236
13년 전 조회 2,135
13년 전 조회 5,665
13년 전 조회 3,836
13년 전 조회 3,115
13년 전 조회 2,966
13년 전 조회 7,297
13년 전 조회 3,104
13년 전 조회 2,763
13년 전 조회 2,629
13년 전 조회 4,205
13년 전 조회 4,136
13년 전 조회 2,526
13년 전 조회 2,728
13년 전 조회 5,960
13년 전 조회 2,003
13년 전 조회 2,496
13년 전 조회 2,803
13년 전 조회 3,209
13년 전 조회 3,197