基础:在移动设备上强制横向模式 [英] Foundation: Force landscape mode on mobile devices
本文介绍了基础:在移动设备上强制横向模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我刚刚开始使用Zurb-Foundation,我想让一个网站只需要在横向模式下运行,当它在移动设备(小屏幕)上启动
我该怎么办?我想它与媒体查询有关。
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.
这是一个网站,而不是Android或IOS的应用程序。
我在Foundation 5工作,感谢您的帮助。 p>
I am working in Foundation 5, thanks for any help.
推荐答案
使用general03推荐的方向选择器,我添加了transform属性:
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);
}
}
这篇关于基础:在移动设备上强制横向模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文