gpt4 book ai didi

jquery - chrome调整背景图片大小问题

转载 作者:太空宇宙 更新时间:2023-11-04 15:48:56 26 4
gpt4 key购买 nike

所以我目前正在开发这个网站:

http://remedia-solutions.com/clientes/0039_kiplingmexico/demo2/

它快完成了,但我目前在调整 2 个背景图像大小时遇到​​一些问题。在 firefox 上它工作得很好但在 chrome 中没有,第二个背景(文本背景)完全以错误的方式缩短我只使用 ccs 来做到这一点所以这是我的 ccs 代码:

#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%;
}

我在第二个 div 上使用 50%,否则它会像 hella big。顺便说一句,我使用视差,但据我所知它根本没有影响。

这是 chrome 上的图片:

http://oi47.tinypic.com/2ivle8i.jpg

Firefox 上的图像:

http://oi47.tinypic.com/2hr1o9e.jpg

有什么想法吗?

最佳答案

.css 中的 #fondo1int 中删除 -webkit-background-size: 50%; 它应该表现相同在两种浏览器中。

最后类应该是这样的:

#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;
}

希望对您有所帮助!

关于jquery - chrome调整背景图片大小问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11442343/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com