如何自动缩放手机页面 [英] How to auto zoom page for mobile

查看:89
本文介绍了如何自动缩放手机页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个页面,我想成为但是当我在移动设备中打开它时,它是像这样.

But when I open it in mobile it is like this.

如何执行此操作以使其自动缩放.

How to do that so that it is auto zoomed.

注意:如果用户尝试缩小&放大它不起作用.

Note: If the user tries to zoom out & zoom in it should not work.

推荐答案

使用CSS媒体查询并在其中设置包装器 (max-width: /*your desired viewport*/) 并控制包装纸的宽度和字体大小. https://www.w3schools.com/css/css_rwd_mediaqueries.asp 如果您不希望用户放大,请使用此元视口

Use CSS media queries and set the wrapper in (max-width: /*your desired viewport*/) and control the width and font-size of your wrappper. https://www.w3schools.com/css/css_rwd_mediaqueries.asp If you don't want users to zoom in, use this meta viewport

<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

这篇关于如何自动缩放手机页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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