js add media query

var msViewportStyle = document.createElement("style");

        msViewportStyle.appendChild(

            document.createTextNode(

                "@media screen and (orientation: portrait) {" +

                    "@-ms-viewport {width: 320px !important;}" +

                "}" +

                "@media screen and (orientation: landscape) {" +

                    "@-ms-viewport {width: 560px !important;}" +

                "}"

            )

        );

  

你可能感兴趣的:(query)