html 0.1像素,html – 什么是initial-scale = 1.0?

通常的移动响应站点将在头部包含HTML元标记,如下所示:

在标记内,width属性控制视口的大小.它可以设置为像width = 400这样的精确像素数,也可以设置为特殊值设备宽度值,它是CSS像素中屏幕宽度的100%. device-width是响应式网站最常用的宽度,可扩展到不同的屏幕尺寸.

首次加载页面时,initial-scale属性控制初始缩放级别,即1个视口像素= 1个CSS像素.用户可扩展,最大规模和最小规模属性控制用户如何缩放或缩小页面.

您可以设置示例html页面并包含viewport标记并更改initial-scale属性以查看差异.还可以尝试在不同的视口大小和方向上查看页面.

initial-scale: The initial zoom when visiting the page. 1.0 does not zoom.

要回答initial-scale = 2.0意味着这里是使用2.0的一个例子:

CsYzb.jpg

In addition to the above, you may want to specify the initial zoom factor for the viewing area. If you want to set the viewport of your page to be equal to the device’s width and have it zoom in by default with a factor of 2 for example, this property will come in handy. The code for that would look as follows:.

The Image above shows what this would look like — although it is not a particularly practical demonstration of the possibilities the initial scale setting has to offer, the underlying point should be clear: content is blown up with a factor of 2 upon first load.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值