0
在移动设备上查看布局时,是否可以强制布局从垂直切换到垂直?我有一张大桌子的桌面,可以在移动设备上查看桌面。我希望它在移动设备上自动锁定垂直方向,以便表格正确显示。用Zurb-Foundation强制屏幕布局
我知道我可以检测屏幕大小,也做我自己的媒体查询,但我怎么能强制布局转移?
在移动设备上查看布局时,是否可以强制布局从垂直切换到垂直?我有一张大桌子的桌面,可以在移动设备上查看桌面。我希望它在移动设备上自动锁定垂直方向,以便表格正确显示。用Zurb-Foundation强制屏幕布局
我知道我可以检测屏幕大小,也做我自己的媒体查询,但我怎么能强制布局转移?
从官方文档:
http://foundation.zurb.com/docs/media-queries.html
CSS:
/* Apply styles to screens in landscape orientation */
@media only screen and (orientation: landscape) {}
/* Apply styles to screens in portrait orientation */
@media only screen and (orientation: portrait) {}
萨斯/ SCSS:
/* Apply styles to screens in landscape orientation */
@media #{$landscape} { }
/* Apply styles to screens in portrait orientation */
@media #{$portrait} { }