javascript - 调整网页大小以适应手机
问题描述
我在我的笔记本电脑上创建了一个小项目来显示一个可以显示方向服务的网站,但它只能在我的笔记本电脑上工作,因为我的手机尺寸太小了。
在网站上:[ https://imgur.com/a/Jio3wSn ]
显示机动的右侧面板仅在输入出发地和目的地后才会出现。但是,在我的手机上,我无法输入出发地和目的地,因为它不适合我的手机尺寸。
电话:[ https://imgur.com/a/O2uVTSA ]
我试过了
<meta name="viewport" content="width=device-width, initial-scale=1.0">
请问有什么办法可以调整地图使其适合手机吗?我只能在手机上看到“右侧面板”,但我在手机上输入出发地和目的地时它仍然是空白的。
我的html页面是:
<body>
<input id="origin-input" class="controls" type="text"
placeholder="Enter an origin location">
<input id="destination-input" class="controls" type="text"
placeholder="Enter a destination location">
<div id="mode-selector" class="controls">
<input type="radio" name="type" id="changemode-walking"
checked="checked">
<label for="changemode-walking">Walking</label>
<input type="radio" name="type" id="changemode-driving" >
<label for="changemode-driving">Driving</label>
</div>
<div id="right-panel">
<p id="Direction"></p>
<p id="Arrows"></p>
</div>
<div id="map"></div>
解决方案
推荐阅读
- vba - 从进程名称中获取应用程序名称。64位需要
- laravel - 如何缩短 eloquent 查询
- sql - SQL 语法查询 order by
- nginx - Cpanel Nginx 仍在监听 80 端口
- c# - 将 SQl 转换为 LINQ(使用 case 语句方法)
- javascript - Jquery,如何使用 jquery 添加隐藏元素
- javascript - 翻转卡片 HTML:单击时不会翻转或保持翻转
- java-8 - 使用项目反应器处理多个外部服务
- r - 在 R 中使用 For 循环生成向量
- reactjs - react-three-fiber 3D 对象(.obj)模型不投射任何阴影