Jquery 在chrome上调整背景图像大小的问题
因此,我目前正在开发此网站: 它几乎完成,但我目前有一些问题时,2背景图像调整。在firefox上,它工作得很好,但在chrome上不工作。第二个背景(文本背景)以错误的方式完全缩短。我只使用ccs来实现这一点,下面是我的ccs代码:Jquery 在chrome上调整背景图像大小的问题,jquery,html,css,Jquery,Html,Css,因此,我目前正在开发此网站: 它几乎完成,但我目前有一些问题时,2背景图像调整。在firefox上,它工作得很好,但在chrome上不工作。第二个背景(文本背景)以错误的方式完全缩短。我只使用ccs来实现这一点,下面是我的ccs代码: #fondo1{ background-image: url("images/imagesbackground/BACKGROUND-INICIO.jpg"); background-attachment: fixed; backgro
#fondo1{
background-image: url("images/imagesbackground/BACKGROUND-INICIO.jpg");
background-attachment: fixed;
background-position: top center;
background-repeat: no-repeat;
background-size: cover;
-moz-background-size: cover;
-webkit-background-size: cover;
position:absolute;
width:100%;
height:100%;
}
#fondo1int{
background-image: url("images/INICIO.png");
background-attachment: fixed;
background-position: center center;
background-repeat: no-repeat;
background-size: 50%;
-moz-background-size: 50%;
-webkit-background-size: 50%;
position:absolute;
width:100%;
height:100%;
}
我在第二季使用了50%,否则它会像hella big一样。顺便说一句,我使用了视差,但据我所知,它根本没有影响
以下是chrome上的图像:
firefox上的图像:
有什么想法吗?删除
-webkit背景大小:50%在.css
中的#fondo1int
中执行code>,并且在两种浏览器中的行为应该相同
最后,该类应如下所示:
#fondo1int {
background-image: url("images/INICIO.png");
background-attachment: fixed;
background-position: center center;
background-repeat: no-repeat;
background-size: 50%;
-moz-background-size: 50%;
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
}
希望有帮助 我真的不明白你的问题。。。也许我遗漏了什么,但我登记了FF和Chrome。你在测试什么版本的chrome?嗯。。。它应该像FF一样工作?做小提琴会不会太难?很难看到像这样的问题尝试在chrome上调整窗口大小,你会在文本背景上看到问题!我要拉小提琴。你会看到背景(文本)将以错误的方式缩小我添加了一些图像来向你展示chromeAwesome tnx中的问题!成功了。但我怀疑在哪里可以找到webkit背景尺寸文档。换句话说,为什么webkit的行为是这样的?不客气,是的,有一个地方,也补充了这一点,你应该没事!