Snippets

代码片段收集板

修复 winPhone8 的 IE10 viewport 问题edit

日期:

作者: 小胡子哥

(function() {
  if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
    var msViewportStyle = document.createElement("style");
    msViewportStyle.appendChild(
      document.createTextNode("@-ms-viewport{width:auto!important}")
    );
    document.getElementsByTagName("head")[0].appendChild(msViewportStyle);
  }
})();

Refer

Matt Stow: Responsive Design in IE10 on Windows Phone 8

Tim Kadlec: Windows Phone 8 and Device-Width

标签:

loading...

这网速真是弱爆了...客官稍等,评论还在加载~