【发布时间】:2014-04-16 02:39:12
【问题描述】:
我已经制作了一个与 nodejs 集成的响应式网站,它在所有设备上都可以正常工作。
但是在Windows Phone IE浏览器中,网页没有向下滚动,不知道是什么原因造成的。
/*css*/
@media (max-width: 400px) {
@-ms-viewport {
width: 320px;
}
}
/*js*/
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);
}
Windows Phone 上的响应能力存在一些问题,因此我使用了上述代码补丁来修复该问题。但是滚动问题仍然存在,有人知道如何解决这个问题吗?
【问题讨论】:
-
你正在测试的 windows phone 的分辨率是多少? 480*800?你指的是水平滚动吗?
-
@PrasannaAarthi 分辨率为 480 x 800 .....
-
尝试添加这个 CSS -ms-touch-action: auto;触摸动作:自动;
-
@PrasannaAarthi 好的,我会尝试并告诉你。
-
你能添加一个小提琴来帮助重现这个问题吗?
标签: html css scroll windows-phone media-queries