我试图推动用户用ipad切换视图。正确的观点应该是景观。
最好的办法是什么?
留言?附加一些html并隐藏肖像内容?
Jquery使用了
if (window.orientation === 0) {
window.addEventListener('orientationchange', callback, false);
}发布于 2012-08-20 12:19:56
您可以:
orientationchange上捕获window事件例如:
<link rel="stylesheet" media="all and (orientation:portrait)" href="portrait.css">
<link rel="stylesheet" media="all and (orientation:landscape)" href="landscape.css">
<script>
window.addEventListener('orientationchange', callback, false);
</script>https://stackoverflow.com/questions/12037470
复制相似问题