gpt4 book ai didi

css - 需要 chrome 加载图像的解决方案

转载 作者:行者123 更新时间:2023-11-28 12:20:20 24 4
gpt4 key购买 nike

我有一个图像设置为 div 的背景。它在 IE10 中加载正常,但为什么它在 chrome 中只加载了一半?刷新页面后它会完全加载。

这是我的 CSS 代码。我不确定它是否经过完美优化,但它适用于 IE10。唯一的问题是背景没有加载 chrome。

html, body {
background-color:black;
height:100%;
width:100%;
margin:0;
padding:0;
text-align:center;
color:white;
font-family:"Century Gothic",Times new roman, Georgia, Serif;
}
#container {
min-height:100%;
height:auto;
height:100%;
}
#img {
margin:0 auto;
width:800px;
height:700px;
background-image:url("../images/comingsoon.jpg");
background-repeat:no-repeat;
background-attachment:fixed;
background-position:center;
padding-bottom:50px;
}
#text {
padding-bottom:100px;
}
#footer {
position:relative;
bottom:0;
width:99%;
padding-bottom:1px;
}
.link a:hover, a:visited, a:link, a:active{
text-decoration:none;
color:white;
}
img {
border:0;
}

最佳答案

这就是 fiddle ,我第一次使用它希望没问题 http://jsfiddle.net/tH2bL/1/ 在这里输入代码

但是如果没有图片你实际上看不出我的问题是什么,你可以在 www.speakeasy-events.com 上用 chrome 查看它

css div img 的 jpg 链接在谷歌浏览器上加载了一半,但在 IE10 上加载了一半,我需要刷新它才能看到完整图片。

另一件事我不确定我的代码是否真的优化过,我想我可能需要很多 div 来做我想做的事,或者我应该把 div #text 放在相对于 #img 的位置,这样它就可以保留同一个地方

对于另一个问题,您可以看到,当浏览器窗口较小并且您使用滚动条时,div 文本会覆盖 img 并将其屏蔽,您如何避免这种情况?

关于css - 需要 chrome 加载图像的解决方案,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18904207/

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