javascript - 更改纵向屏幕的 CSS(例如 iPad)

标签 javascript jquery css

<分区>

我已经建立了一个网站,我很高兴它的响应能力。但是,在纵向模式下的 iPad 上,下半部分有大量空白区域,我想知道是否有一种方法可以检测纵向屏幕并相应地更改 CSS。

如果有人能指出我正确的方向,将不胜感激!

谢谢

最佳答案

/* Portrait */
@media screen and (orientation:portrait) {
/* Portrait styles */
}
/* Landscape */
@media screen and (orientation:landscape) {
/* Landscape styles */
}

关于javascript - 更改纵向屏幕的 CSS(例如 iPad),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19289206/

上一篇:jquery - 我正在尝试 .load() 只有 1 个 div 但所有内容都已加载

下一篇:html - :active link is not working

相关文章:

javascript - 如何在jquery中动态初始化组件到输入字段

javascript - 不同时间重复物体

javascript - 单击子菜单会弹出 WordPress 插件中的模式

Jquery 动画旋转不起作用

html - layout 3 div in a fixed containing div, with heights : 1div as much as it needs, 2div 60% from the rest, 3div 40% from the rest

c# - 为什么 SASS @mixin 不能在 Visual Studio 中工作?

css - SVG 的宽度/高度属性的单位

javascript - 我怎样才能拥有能够扩展一行中所有列的 Bootstrap 文本区域

Javascript/jQuery 弹出循环并添加

javascript - 将元素与唯一的编号相关联