디바이스별 viewport 설정. 정보
Mobile 디바이스별 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 }?>
<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 }?>
추천
3
3
댓글 6개
좋네요 굿뜨!
오 좋네요. 이거 바로 써먹을수 있을것 같네요.
감사합니다 !
골머리 썩고 있었는데,
이 문서 때문에 힌트 얻어 작업 마무리가 잘 되었습니다.
감사합니다!!
이 문서 때문에 힌트 얻어 작업 마무리가 잘 되었습니다.
감사합니다!!
감사합니다!!
감사합니다 ^-^ 해결되었습니당 ㄳㄳㄳ