0

Is there a way I can force the layout to change from landscape to vertical while it is being viewed on a mobile divice? I have a page with a large table that cuts the table off when viewed on a mobile divice. I want it to automatically lock in a vertical orientation while on a mobile divice so that the table displays properly.

I know I can detect the screen size and also do my own media queries, but how can I force the layout to shift?

4

1 回答 1

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} { }
于 2013-07-25T23:13:56.570 回答