移动表单很小
我有一个网页的移动版本。它只有一个表单,带有两个文本框和一个提交按钮。
但在移动浏览器上,表单很小,直到您放大为止。如何使表单在移动浏览器上默认看起来正常?
I have a mobile version of a webpage. All it has is a single form w/ two text boxes and one submit button.
But on the mobile browser, the form is tiny until you zoom in on it. How do you make a form look normal by default on a mobile browser?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
对于元视口,我使用以下内容:
这样,宽度就没有限制,因此无论用户使用的是手机还是iPad(或其他平板设备),它都可以进行相应调整。如果您正在构建专门针对移动设备的网站,我仅建议使用
user-scale=no
。With the meta viewport, I use the following:
This way, there is no restriction on the width, so it can adjust accordingly whether the user is using a mobile phone or an iPad (or other tablet device). I would only recommend using the
user-scale=no
if you are building a site specifically for mobile.您的 Doctype 是移动设备吗?
尝试使用
,以便手机浏览器知道该页面是为手机设计的
Is your Doctype mobile?
Try using
so that phone's browser would know that page is designed for mobile phones
您需要将视口元标记添加到 HTML 标头。这将告诉浏览器您的页面应该呈现为某个方面。例如
You will need to add the viewport meta tag to the HTML header. This will tell the browser that your page is suppose to be rendered into a certain aspect. e.g.