问题
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