我已将 psd 着陆页编码为 html5/css3 并使其适合 ipad 和移动设备,但存在问题 当我尝试在高度超过 768px 的屏幕上浏览它时,元素变小并显示在半页中,另一半是空的! 直播网址:http://idealogy-creative.com/1/ 问题的屏幕截图 https://www.browserstack.com/screenshots/c7f2884acf1102cc3536c1c5b8b62208ff8a8c92/win8.1_ie_11.0_Desktop.jpg
请帮帮我!
最佳答案
我有同样的问题,我改变了一些小的东西来解决这个问题,也许是视口(viewport)?先尝试设置视口(viewport),然后告诉我,我会检查我的网站。
P.S 对于 Windows Phone 你必须设置一些更多的东西: 1. CSS
@-webkit-viewport { width: device-width; }
@-moz-viewport { width: device-width; }
@-ms-viewport { width: device-width; }
@-o-viewport { width: device-width; }
@viewport { width: device-width; }
脚本:
//针对 windows phone 的修复
if (navigator.userAgent.match(/IEMobile/10.0/) || navigator.userAgent.match(/IEMobile/11.0/) || navigator.userAgent.match(/WPDesktop/)) {
var msViewportStyle = document.createElement("style"); msViewportStyle.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}")); document.getElementsByTagName("head")[0].appendChild(msViewportStyle);
关于jquery - 屏幕高度超过 768px 的元素错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26809526/