Foundation: Force landscape mode on mobile devices

一曲冷凌霜 提交于 2019-12-22 17:49:08

问题



I just started with Zurb-Foundation, and I am trying to make a website that needs to be run in landscape mode only, when it is started on a mobile device(small screens)
How would i do this? I guess it has something to do with media queries.

So I want it to force orientation to landscape mode if the screen is a mobile device.

This is a website, not an Application to Android or IOS.

I am working in Foundation 5, thanks for any help.


回答1:


With the orientation selector that general03 recommended, I added the transform property:

@media only screen and (max-width: 630px) and (orientation: portrait) {
  .video-container{
    transform: rotate(-90deg);
    -ms-transform: rotate(-90deg);
    -webkit-transform: rotate(-90deg);
  }
}



回答2:


create a webview in activity and in manifest declartion

  android:screenOrientation="landscape"


来源:https://stackoverflow.com/questions/27146742/foundation-force-landscape-mode-on-mobile-devices

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!