디바이스별 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,890
13년 전 조회 2,339
13년 전 조회 4,103
13년 전 조회 3,066
13년 전 조회 2,219
13년 전 조회 2,203
13년 전 조회 8,795
13년 전 조회 3,680
13년 전 조회 2,478
13년 전 조회 2,579
13년 전 조회 4,216
13년 전 조회 2,538
13년 전 조회 2.1만
13년 전 조회 4,256
13년 전 조회 4,195
13년 전 조회 6,135
13년 전 조회 3,462
13년 전 조회 2,319
13년 전 조회 2,482
13년 전 조회 1.7만
13년 전 조회 2,280
13년 전 조회 3,471
13년 전 조회 3,025
13년 전 조회 2,748
13년 전 조회 2,657
13년 전 조회 2,818
13년 전 조회 2.5만
13년 전 조회 3,885
13년 전 조회 3만
13년 전 조회 3,703
13년 전 조회 2.4만
13년 전 조회 7,001
13년 전 조회 2,425
13년 전 조회 2,384
13년 전 조회 4,088
13년 전 조회 2,578
13년 전 조회 3,614
13년 전 조회 2,783
13년 전 조회 2,732
13년 전 조회 8,148
13년 전 조회 6,710
13년 전 조회 2,580
13년 전 조회 2,646
13년 전 조회 6,541
13년 전 조회 7,879
13년 전 조회 2,631
13년 전 조회 1,977
13년 전 조회 2,375
13년 전 조회 3,399
13년 전 조회 7,115
13년 전 조회 2,537
13년 전 조회 3,216
13년 전 조회 2,817
13년 전 조회 1,966
13년 전 조회 2,787
13년 전 조회 2,234
13년 전 조회 2,134
13년 전 조회 7,619
13년 전 조회 2,374
13년 전 조회 1,949
13년 전 조회 4,244
13년 전 조회 2,596
13년 전 조회 4,994
13년 전 조회 2,818
13년 전 조회 2,449
13년 전 조회 1,997
13년 전 조회 1,984
13년 전 조회 2,226
13년 전 조회 2,446
13년 전 조회 3,165
13년 전 조회 2,418
13년 전 조회 3,608
13년 전 조회 2,496
13년 전 조회 5,654
13년 전 조회 4,814
13년 전 조회 6,364
13년 전 조회 8,965
13년 전 조회 4,206
13년 전 조회 3,647
13년 전 조회 2,009
13년 전 조회 4,351
13년 전 조회 2,234
13년 전 조회 5,786
13년 전 조회 3,942
13년 전 조회 3,222
13년 전 조회 3,072
13년 전 조회 7,416
13년 전 조회 3,204
13년 전 조회 2,865
13년 전 조회 2,735
13년 전 조회 4,307
13년 전 조회 4,251
13년 전 조회 2,626
13년 전 조회 2,836
13년 전 조회 6,067
13년 전 조회 2,106
13년 전 조회 2,595
13년 전 조회 2,925
13년 전 조회 3,324
13년 전 조회 3,299