我使用媒体查询使我的页面在移动设备上响应,但注意到当设备旋转时它不会影响媒体查询。我怎样才能以即使在屏幕旋转(横向)时它仍然保持不变的方式使用它。
最佳答案
你应该使用设备方向
设备方向
@media all and (orientation:portrait) {
/* Styles for Portrait screen */
}
@media all and (orientation:landscape) {
/* Styles for Landscape screen */
}
供引用:1) click me 2) me too
关于css - 使用媒体查询景观,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36635416/