Friday 23 January 2015

Rotate Screen Orientation detection Device Desktop:

Rotate Screen Orientation Device Desktop:
==============================

<!DOCTYPE html>
<html>

<body>
    <script>
        window.addEventListener("orientationchange", function () {
            var _width = window.innerWidth;
        });
    </script>


    <style>
       
       
        @media screen and (max-width:720px) and (orientation: landscape) {
            body {
                background: url(img/portrait.png) no-repeat center center fixed;
                -webkit-background-size: contain;
                -moz-background-size: contain;
                -o-background-size: contain;
                background-size: contain;
             
            }
        }
       
       
        @media screen and (orientation: landscape) {}
    </style>
</body>

</html>

No comments:

Post a Comment