디바이스별 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개

좋네요 굿뜨!
오 좋네요. 이거 바로 써먹을수 있을것 같네요.
골머리 썩고 있었는데,
이 문서 때문에 힌트 얻어 작업 마무리가 잘 되었습니다.
감사합니다!!
감사합니다!!
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

태그 필터 (최대 3개) 전체 개발자 소스 기타 mysql 팁자료실 javascript php linux flash 정규표현식 jquery node.js mobile 웹서버 os 프로그램 강좌 썸네일 이미지관련 도로명주소 그누보드5 기획자 견적서 계약서 기획서 마케팅 제안서 seo 통계 서식 통계자료 퍼블리셔 html css 반응형 웹접근성 퍼블리싱 표준화 반응형웹 홈페이지기초 부트스트랩 angularjs 포럼 스크린리더 센스리더 개발자톡 개발자팁 퍼블리셔톡 퍼블리셔팁 기획자톡 기획자팁 프로그램강좌 퍼블리싱강좌
+
제목 글쓴이 날짜 조회
13년 전 조회 1,578
13년 전 조회 1,031
13년 전 조회 2,768
13년 전 조회 1,743
13년 전 조회 906
13년 전 조회 1,148
13년 전 조회 7,715
13년 전 조회 2,646
13년 전 조회 1,182
13년 전 조회 1,539
13년 전 조회 3,112
13년 전 조회 1,274
13년 전 조회 2만
13년 전 조회 3,178
13년 전 조회 2,908
13년 전 조회 5,067
13년 전 조회 2,195
13년 전 조회 1,060
13년 전 조회 1,239
13년 전 조회 1.6만
13년 전 조회 1,011
13년 전 조회 2,444
13년 전 조회 1,998
13년 전 조회 1,538
13년 전 조회 1,417
13년 전 조회 1,547
13년 전 조회 2.4만
13년 전 조회 2,866
13년 전 조회 2.9만
13년 전 조회 2,461
13년 전 조회 2.3만
13년 전 조회 5,988
13년 전 조회 1,189
13년 전 조회 1,169
13년 전 조회 3,043
13년 전 조회 1,347
13년 전 조회 2,566
13년 전 조회 1,765
13년 전 조회 1,748
13년 전 조회 6,894
13년 전 조회 5,450
13년 전 조회 1,310
13년 전 조회 1,444
13년 전 조회 5,296
13년 전 조회 6,656
13년 전 조회 1,440
13년 전 조회 769
13년 전 조회 1,158
13년 전 조회 2,123
13년 전 조회 5,852
13년 전 조회 1,288
13년 전 조회 1,958
13년 전 조회 1,550
13년 전 조회 738
13년 전 조회 1,562
13년 전 조회 1,014
13년 전 조회 860
13년 전 조회 6,378
13년 전 조회 1,122
13년 전 조회 672
13년 전 조회 3,030
13년 전 조회 1,419
13년 전 조회 3,787
13년 전 조회 1,616
13년 전 조회 1,276
13년 전 조회 832
13년 전 조회 819
13년 전 조회 1,056
13년 전 조회 1,265
13년 전 조회 1,972
13년 전 조회 1,258
13년 전 조회 2,381
13년 전 조회 1,322
13년 전 조회 4,441
13년 전 조회 3,599
13년 전 조회 5,184
13년 전 조회 7,773
13년 전 조회 3,020
13년 전 조회 2,456
13년 전 조회 849
13년 전 조회 3,180
13년 전 조회 1,076
13년 전 조회 4,572
13년 전 조회 2,708
13년 전 조회 2,074
13년 전 조회 1,850
13년 전 조회 6,189
13년 전 조회 1,986
13년 전 조회 1,640
13년 전 조회 1,549
13년 전 조회 3,085
13년 전 조회 3,077
13년 전 조회 1,405
13년 전 조회 1,615
13년 전 조회 4,856
13년 전 조회 914
13년 전 조회 1,395
13년 전 조회 1,704
13년 전 조회 2,109
13년 전 조회 2,142