ValorLin / orientation-js

Using js to detect device orientation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Orientation-js

Detect device orientation.

Usage

In stylesheets

.portrait .stuff{
  background-color: red;
}

.landscape .stuff{
  background-color: blue;
}

In scripts

if(Orientation.isPortrait()){
  // do something
}

if(Orientation.isLandscape()){
  // do something
}

About

Using js to detect device orientation.


Languages

Language:JavaScript 63.6%Language:HTML 36.4%