Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 固定宽度div在iPhone中将背景图像设置为body时变小_Html_Css_Iphone - Fatal编程技术网

Html 固定宽度div在iPhone中将背景图像设置为body时变小

Html 固定宽度div在iPhone中将背景图像设置为body时变小,html,css,iphone,Html,Css,Iphone,我想显示一个静态页面,其中心有一个div,其主体背景设置了一个图像。 对于设置身体背景,我使用以下代码: body { background: url('Images/background_landing.jpg') center center fixed; background-repeat:no-repeat; -webkit-background-size: cover; -moz-background-size: cover;

我想显示一个静态页面,其中心有一个div,其主体背景设置了一个图像。 对于设置身体背景,我使用以下代码:

body
   {
       background: url('Images/background_landing.jpg') center center fixed;
       background-repeat:no-repeat;
       -webkit-background-size: cover;
       -moz-background-size: cover;
       -o-background-size: cover;
       background-size: cover;
   } 
下面这段代码是我身体里的div

#popContent
{
 z-index:1;
 width:550px;
 background-color:White;
 height:600px;
 margin:0px auto;
 position:relative;
 top:20px;
 left:0px;       
}
我正在使用引导程序使页面响应。对于台式机和平板电脑,它工作正常,但当我在iPhone上测试时,它的(div)非常小,尽管我已经为该div设置了一个固定的宽度,媒体查询也不工作。请建议我摆脱这种情况


感谢您抽出时间

您是否使用meta标签禁用iphone上的缩放功能

<meta name="viewport" content="width=device-width, user-scalable=no">


如果没有,试着把它放进去。Iphone的像素密度非常高,这意味着div必须达到640px才能填满屏幕。如果这不起作用,请在媒体查询中发布html和css代码。

谢谢Paco您的回答对我帮助很大