iPad Safari视口的高度 [英] Height of the iPad Safari viewport

查看:133
本文介绍了iPad Safari视口的高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  1. iPad的视口为980像素宽.高度是多少?
  2. 在Safari中,我们必须添加地址和新水龙头. Safari在横向模式下的高度是多少?
  3. 有一个媒体查询可以使网络适合宽度-有没有办法使网络适合高度?

推荐答案

以下是答案;

  1. 您是对的.两个iPhone/iPad上的默认视口均为980px.这样,没有默认的视口高度.您可以使用来更改宽度/高度;

  1. You are right. The default viewport on both iPhone/iPad is 980px. There is no default viewport height, as such. You can change the width/height using;

<meta name="viewport" content="width=device-width, height=device-height" >

  • 我不太明白这个问题.但是可以,因为iPad的分辨率为1024x768px,所以在横向模式下,其高度应约为768px(减去地址栏的高度应约为40px左右)

  • I could not quite understand the question. But yes, since the iPad resolution is 1024x768px, So in landscape mode, the height should be around 768px (minus the address bar height which should be around 40px or so)

    大多数浏览器的工作方式是允许他们设置宽度和高度(根据其他因素,包括初始缩放级别)进行相应调整.因此,您通常需要设置宽度.

    The way most browsers work is they allow to set the width and height is adjusted accordingly (based on other factors including initial zoom level as well). So you need to work with setting width most of the times.

    这篇关于iPad Safari视口的高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆