奇怪的 CSS 行为
我在博客上安装了模板,但它没有显示背景图片。
没有背景图像(橙色的图像)
在这里的主博客中,您可以看到现在访问这是我首先测试模板的博客,正常显示背景。
奇怪的结果是,如果你现在返回第一个网站并刷新它,就会显示背景??
在两个不同的域之间怎么会发生这种情况? 它们都引用相同的图像,但为什么只有在加载 website1 后才加载它/developper-talk.blogspot.com/" rel="nofollow noreferrer">网站2?
这是相关的CSS
#body_top {
background:transparent url(http://4.bp.blogspot.com/_66wIGDjagHk/Sh1HpWevpII/AAAAAAAAAeo/L2BR0NJ6kB4/s1600/bgr_body_top.png) no-repeat scroll 0 0;
width:100%;
}
I installed a template on blogger, but it's not showing the background image.
in the main blog here you can see that there is no background image (the orange one)
now visiting this one which is the blog I do test the template on first, shows normally the background.
the weird result is that if you go back to the first website now and refresh it, the background will be shown??
how can that happen between 2 different domains? they both reference the same image but why it loads on website1 only after loading website2?
this is the CSS associated
#body_top {
background:transparent url(http://4.bp.blogspot.com/_66wIGDjagHk/Sh1HpWevpII/AAAAAAAAAeo/L2BR0NJ6kB4/s1600/bgr_body_top.png) no-repeat scroll 0 0;
width:100%;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许某些资源需要很长时间才能加载? 然后访问第二个站点会导致它被加载到缓存中 - 这充当重新排序的作用。
我建议使用 firebug - Network 选项卡检查此行为。
编辑:奇怪的是,firebug 显示服务器响应 404
看起来像 HTTP 而不是 CSS bug。 当连接已打开时(保持活动问题?),服务器会响应 404,否则返回图像。
好的,这是引荐来源。 它应该是 blogspot.com 子域。
也许 blogspot 有某种文件大小限制,不允许从其他站点热链接大文件。 background_top 似乎比其他文件大一些。
请在此处查看 blogspot.com 引荐来源网址限制:http:// www.google.com/support/blogger/bin/answer.py?answer=57527
Maybe some resource takes extremely long to load? Then visiting the second site causes it to be loaded to a cache - which acts as a reordering.
I'd suggest inspecting this behaviour with firebug - Network tab.
EDIT: weird, the firebug shows that server responds with 404
Appears like HTTP and not CSS bug. The server responds with 404 when connection is already open (keep-alive issue?) and returns the image otherwise.
OK, it's the referer. It should be blogspot.com subdomain.
Maybe blogspot has some sort of file size limit which disallows hot-linking of large files from other sites. The background_top seems somewhat larger than other files.
Here, look at blogspot.com referrer restrictions: http://www.google.com/support/blogger/bin/answer.py?answer=57527