Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/37.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
Jquery 背景图像无法正确渲染,其他图像无法显示在Ipad上_Jquery_Css_Ipad_Html_Ipad 2 - Fatal编程技术网

Jquery 背景图像无法正确渲染,其他图像无法显示在Ipad上

Jquery 背景图像无法正确渲染,其他图像无法显示在Ipad上,jquery,css,ipad,html,ipad-2,Jquery,Css,Ipad,Html,Ipad 2,您好,我正在开发此网站: 事实上,它在Mac和PC浏览器上都能很好地工作,这里的问题是当我进入Safari Ipad时,一些背景图像根本不显示,而其他的则存在缩放问题 所以我会给你看我目前的CSS,看看我是否能得到任何帮助,因为我是Ipad上的新手 这是我的IPAD css(还有一个用于PC和mac): 这是我用来计算窗口高度和宽度的jquery: $("#todoini,#todohistoria , #todocoleccion , #todocuidados, #todosucursal

您好,我正在开发此网站:

事实上,它在Mac和PC浏览器上都能很好地工作,这里的问题是当我进入Safari Ipad时,一些背景图像根本不显示,而其他的则存在缩放问题

所以我会给你看我目前的CSS,看看我是否能得到任何帮助,因为我是Ipad上的新手

这是我的IPAD css(还有一个用于PC和mac):

这是我用来计算窗口高度和宽度的jquery:

$("#todoini,#todohistoria , #todocoleccion , #todocuidados, #todosucursales,#todocontacto").css('height', $(window).height());
$("#todoini, #todohistoria , #todocoleccion , #todocuidados, #todosucursales,#todocontacto").css('width', $(window).width());
$("#navimage").css('margin-left', $(window).width() / 2 - 140);
$("#navimage").css('margin-top', $(window).height() -140);
$("#contenidoimagen , #contenidoimagen2 , #contenidoimagen3 , #contenidoimagen4, #contenidoimagen5,#contenidoimagen6").css('width', $(window).width());
$("#contenidoimagen, #contenidoimagen2 ,#contenidoimagen3 , #contenidoimagen4 , #contenidoimagen5,#contenidoimagen6").css('height', $(window).height());
$("#todo").css('width', $("#todoini").width() + $("#todohistoria").width() + $("#todocoleccion").width() + $("#todocuidados").width() + $("#todosucursales").width() + $("#todocontacto").width());
$("#todoini , #todohistoria, #todocoleccion, #todocuidados, #todosucursales, #todocontacto").css('float', 'left');
$(window).resize(function() {
    $("#todoini,#todohistoria , #todocoleccion , #todocuidados, #todosucursales, #todocontacto ").css('height', $(window).height());
    $("#todoini,#todohistoria , #todocoleccion , #todocuidados, #todosucursales, #todocontacto").css('width', $(window).width());
    $("#contenidoimagen , #contenidoimagen2 , #contenidoimagen3 , #contenidoimagen4, #contenidoimagen5 , #contenidoimagen6").css('width', $(window).width());
    $("#todo").css('width', $("#todoini").width() + $("#todohistoria").width() + $("#todocoleccion").width() + $("#todocuidados").width() + $("#todosucursales").width() + $("#todocontacto").width());
});
$(window).trigger('resize')
因此,背景容器始终设置了宽度和高度

有什么想法吗


快速编辑如果我使用背景尺寸:封面,它确实显示,但图像很大://

解决方案是为每个背景设置宽度和高度

#fondo1{
    background:  url("images/imagesbackground/BACKGROUND-INICIO.jpg");
    background-position:    top center;
    background-repeat:      no-repeat;
    -webkit-background-size:    1024px 768px !important;
    position:absolute;
    width:1024px !important;
    height:768px !important;



}
#fondo1int{
    background-image: url("images/INICIO-OTONO.png") !important;
    background-position:    center center;
    background-attachment: initial; 
    background-repeat:      no-repeat;
    background-size:    800px 400px !important;
    position:absolute;
    width:1024px !important;
    height:768px !important;



}
#fondo1{
    background:  url("images/imagesbackground/BACKGROUND-INICIO.jpg");
    background-position:    top center;
    background-repeat:      no-repeat;
    -webkit-background-size:    1024px 768px !important;
    position:absolute;
    width:1024px !important;
    height:768px !important;



}
#fondo1int{
    background-image: url("images/INICIO-OTONO.png") !important;
    background-position:    center center;
    background-attachment: initial; 
    background-repeat:      no-repeat;
    background-size:    800px 400px !important;
    position:absolute;
    width:1024px !important;
    height:768px !important;



}