[英]Mobile website stretched
http://demo.dev.rbmleads.com/personalloan/v10/ http://demo.dev.rbmleads.com/personalloan/v10/
I made a mobile version of a form for work but can't figure out why it's stretched out like this. 我制作了工作表单的移动版本,但不知道为什么会这样拉伸。 It's supposed to look like this:
应该看起来像这样:
but instead it looks like this: 但是它看起来像这样:
I thought it was a stray element in there with a set with but all the elements are set to auto or a %. 我以为这是一个杂散元素,其中包含,但所有元素都设置为auto或%。 Any idea?
任何想法? Thanks.
谢谢。
Are you declaring the viewport
meta tag? 您是在声明
viewport
元标记吗?
Add this to your <head>
: 将此添加到您的
<head>
:
<meta name="viewport" content="width=device-width, initial-scale=1.0">
If you need to disable zooming: 如果需要禁用缩放:
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
Make sure you set the meta tag 确保设置了meta标签
<meta name="viewport" width="device-width" />
this will make your 100% a little closer to 100% 这会使您的100%接近100%
there are a few other parameters you can set like initial zoom and heights but I think this width will solve your problem 您还可以设置其他一些参数,例如初始缩放和高度,但我认为此宽度将解决您的问题
EDIT: One additional thing you can try is to query width and set the font size 编辑:您可以尝试的另一件事是查询宽度并设置字体大小
example of some LESS: 一些较少的示例:
html,body{
font-family: "Century Gothic", CenturyGothic, AppleGothic, sans-serif;
font-size: 16px;
@media only screen and (max-width : 600px) {
font-size: 11px;
}
}
Basically this sets your base font to 16px on a phone and 11px on a desktop. 基本上,这会将您的基本字体在手机上设置为16px,在桌面上设置为11px。
Maybe it is just the resolution try Ctrl + Shift + M in Firefox. 也许只是分辨率,请在Firefox中尝试Ctrl + Shift + M 。 Also set
<meta name="viewport" content="width=device-width, initial-scale=1.0">
and play with the scale. 还要设置
<meta name="viewport" content="width=device-width, initial-scale=1.0">
并使用比例尺。
Your sandbox is not reachable, which makes it hard to find the issue. 您的沙箱无法访问,因此很难找到问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.