Fork me on GitHub

Viewport

Resize your browser's width and see what happens :)

YUI().use(
  'aui-viewport'
);
.view-lt320 .myViewport,
.view-320 .myViewport {
    width: 54px;
    height: 105px;
    background: url(../img/phone_portrait.png) no-repeat;
}
.view-480 .myViewport {
    width: 102px;
    height: 52px;
    background: url(../img/phone_landscape.png) no-repeat;
}
.view-720 .myViewport {
    width: 114px;
    height: 145px;
    background: url(../img/tablet_portrait.png) no-repeat;
}
.view-960 .myViewport {
    width: 207px;
    height: 167px;
    background: url(../img/desktop.png) no-repeat;
}