2013-07-24 61 views
0

在移動設備上查看佈局時,是否可以強制佈局從垂直切換到垂直?我有一張大桌子的桌面,可以在移動設備上查看桌面。我希望它在移動設備上自動鎖定垂直方向,以便表格正確顯示。用Zurb-Foundation強制屏幕布局

我知道我可以檢測屏幕大小,也做我自己的媒體查詢,但我怎麼能強制佈局轉移?

回答

0

從官方文檔:

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} { }