디바이스별 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년 전 조회 2,955
13년 전 조회 2,420
13년 전 조회 4,181
13년 전 조회 3,145
13년 전 조회 2,291
13년 전 조회 2,213
13년 전 조회 8,816
13년 전 조회 3,703
13년 전 조회 2,551
13년 전 조회 2,592
13년 전 조회 4,238
13년 전 조회 2,606
13년 전 조회 2.1만
13년 전 조회 4,278
13년 전 조회 4,274
13년 전 조회 6,154
13년 전 조회 3,535
13년 전 조회 2,390
13년 전 조회 2,560
13년 전 조회 1.7만
13년 전 조회 2,354
13년 전 조회 3,495
13년 전 조회 3,036
13년 전 조회 2,828
13년 전 조회 2,738
13년 전 조회 2,889
13년 전 조회 2.5만
13년 전 조회 3,907
13년 전 조회 3만
13년 전 조회 3,786
13년 전 조회 2.4만
13년 전 조회 7,016
13년 전 조회 2,502
13년 전 조회 2,457
13년 전 조회 4,103
13년 전 조회 2,642
13년 전 조회 3,635
13년 전 조회 2,806
13년 전 조회 2,748
13년 전 조회 8,228
13년 전 조회 6,786
13년 전 조회 2,657
13년 전 조회 2,726
13년 전 조회 6,613
13년 전 조회 7,949
13년 전 조회 2,704
13년 전 조회 2,048
13년 전 조회 2,451
13년 전 조회 3,483
13년 전 조회 7,189
13년 전 조회 2,621
13년 전 조회 3,301
13년 전 조회 2,905
13년 전 조회 2,033
13년 전 조회 2,871
13년 전 조회 2,304
13년 전 조회 2,202
13년 전 조회 7,700
13년 전 조회 2,450
13년 전 조회 2,016
13년 전 조회 4,311
13년 전 조회 2,669
13년 전 조회 5,063
13년 전 조회 2,882
13년 전 조회 2,523
13년 전 조회 2,075
13년 전 조회 2,064
13년 전 조회 2,303
13년 전 조회 2,510
13년 전 조회 3,230
13년 전 조회 2,487
13년 전 조회 3,690
13년 전 조회 2,565
13년 전 조회 5,724
13년 전 조회 4,886
13년 전 조회 6,439
13년 전 조회 9,034
13년 전 조회 4,286
13년 전 조회 3,713
13년 전 조회 2,074
13년 전 조회 4,421
13년 전 조회 2,299
13년 전 조회 5,860
13년 전 조회 4,005
13년 전 조회 3,281
13년 전 조회 3,144
13년 전 조회 7,472
13년 전 조회 3,272
13년 전 조회 2,915
13년 전 조회 2,818
13년 전 조회 4,378
13년 전 조회 4,322
13년 전 조회 2,686
13년 전 조회 2,902
13년 전 조회 6,135
13년 전 조회 2,173
13년 전 조회 2,661
13년 전 조회 2,999
13년 전 조회 3,391
13년 전 조회 3,368