除了有时(可能每 25 次运行中有 1 次)我用 CSS 调用的图像无法正确加载外,我无法提供太多信息。图像在那里,因为如果我将鼠标悬停在它上面,它会显示在某些地方。
HTML:
<div class="body-top"> blah </div>
CSS:
.body-top {background:url(../images/top.gif) no-repeat; height:55px; width: 970px; margin:0; padding:0;}
它在 Visual Studio 的开发服务器上运行。
有什么想法吗?
编辑:将鼠标悬停在图片本身上实际上不会显示任何内容,而是当我将鼠标悬停在图片上的链接上时
最佳答案
不看页面很难提供帮助,但是。
你能确认里面的元素没有背景颜色吗? 尝试添加这个来测试:
.body-top *{background:none !important;}
不要将其用作最终代码,因为 !important 标志将停止为 .body-top 中的元素工作的任何背景
关于html - CSS图像间歇性加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4945549/