■ 개발관련 ■/산수와 알고리즘
반응형 해상도의 조건문
serpiko
2013. 10. 16. 01:50
반응형 해상도의 조건문
js
var _wide = 1024; var _tablet = 768; var _stageWidth = $(window).width(); if( _stageWidth >= _wide){ //wideMode }else if(_stageWidth < _wide && _stageWidth >= _tablet ) { //tablet }else if(_stageWidth < _tablet){ //mobile }
as3.0
public function resize(): void { var sw:int = _control.stage.stageWidth; var sh:int = _control.stage.stageHeight; if(1600 <= sw) { } if(1600 > sw && sw >= 1400) { } if(1400 > sw && sw >= 1280) { } if(1280 > sw && sw >= 1024) { } if(1024 > sw && sw >= 768) { } if(768 > sw && sw >= 320) { } }