简体   繁体   English

使用Foundation的单页应用视口移动版

[英]Single page app viewport mobile using Foundation

I am using Foundation for a responsive website and have a problem with SOME mobile devices not properly scaling the viewport ONLY when you load another page via our ng-include. 我将Foundation用于响应快速的网站,并且某些移动设备仅在通过ng-include加载另一个页面时才无法正确缩放视口。 This loads new content into the page and the width of the page then breaks and requires horizontal scrolling. 这会将新的内容加载到页面中,然后页面的宽度会中断并需要水平滚动。

This doesn't happen in certain devices such as Galaxy Note 3/4, but does happen in devices with identical resolutions, such as iPhone 6 Plus. 在某些设备(例如Galaxy Note 3/4)中不会发生这种情况,但在分辨率相同的设备(例如iPhone 6 Plus)中会发生这种情况。 I do have a viewport attribute and scaling set: 我确实有一个视口属性和缩放比例设置:

<meta name="viewport" content="width=device-width, initial-scale=1, target-densityDpi=device-dpi;">

Any help figuring out why this doesn't scale properly when I load new dynamic content for this single page application is greatly appreciated. 非常感谢您提供的帮助,以弄清为什么我在为该单页应用程序加载新的动态内容时无法正确缩放。 I'm not sure if it's related (just thought of it), but we also use document equalizer reflow often: 我不确定是否相关(只是考虑了一下),但是我们也经常使用文档均衡器重排:

$(document).foundation('equalizer','reflow');

I needed to add a min and max scale. 我需要添加最小和最大比例。 Although I didn't test it, I imagine I just needed to add a max scale, as the content was flowing off the screen. 尽管没有测试,但我想我只是需要增加一个最大比例,因为内容从屏幕上流出。

<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM