根据用户用于浏览的设备(android标签,iphone,ipad)动态改变zend中的布局和模板 [英] change layout and template in zend dynamically according to the device(android tab,iphone,ipad) which the user use for browsing
问题描述
我正在开发一个应用程序,杂志商店为PC和我已完成pc的大部分工作,但客户也想在其他Android设备(加载为网络视图)有同样的事情。
I am developing an application, magazine store for PC and I have completed most of the work for pc, but the client also want to have the same thing in other android devices (load as web view).
由于这些设备的高度和宽度不同于PC,所以我需要以最简单的方式获得设备的大小和高度,以便我可以根据设备切换视图。 / p>
Since these devices height and width varies the from that of PC so I need to get the device size and height in the most simple way, so that I can switch view according to the device.
推荐答案
我不认为它有什么要看到的Zend Framework / PHP(根据你的问题标签)。您的问题是相对于Javascript / CSS。
I don't think it has anything to see with Zend Framework/PHP (according to your question tags). Your question is more relative to Javascript/CSS.
我建议你这篇真棒文章:不同大小的浏览器窗口的不同样式。你也可以把这个网站作为参考,他们的技术是真正的最好的方式来做它,但它需要很多的工作(和时间)。
I recommend you this awesome article: Different Stylesheets for Differently Sized Browser Windows on CSS-Tricks. You can also take this website as a reference, their technique is really the best way to do it to me, but it requires a lot of work (and time) too.
这篇关于根据用户用于浏览的设备(android标签,iphone,ipad)动态改变zend中的布局和模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!